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

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/MerlinKodo/quic-go (interfaces: Packer)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -build_flags=-tags=gomock -package quic -self_package github.com/MerlinKodo/quic-go -destination mock_packer_test.go github.com/MerlinKodo/quic-go Packer
     7  //
     8  // Package quic is a generated GoMock package.
     9  package quic
    10  
    11  import (
    12  	reflect "reflect"
    13  
    14  	ackhandler "github.com/MerlinKodo/quic-go/internal/ackhandler"
    15  	protocol "github.com/MerlinKodo/quic-go/internal/protocol"
    16  	qerr "github.com/MerlinKodo/quic-go/internal/qerr"
    17  	gomock "go.uber.org/mock/gomock"
    18  )
    19  
    20  // MockPacker is a mock of Packer interface.
    21  type MockPacker struct {
    22  	ctrl     *gomock.Controller
    23  	recorder *MockPackerMockRecorder
    24  }
    25  
    26  // MockPackerMockRecorder is the mock recorder for MockPacker.
    27  type MockPackerMockRecorder struct {
    28  	mock *MockPacker
    29  }
    30  
    31  // NewMockPacker creates a new mock instance.
    32  func NewMockPacker(ctrl *gomock.Controller) *MockPacker {
    33  	mock := &MockPacker{ctrl: ctrl}
    34  	mock.recorder = &MockPackerMockRecorder{mock}
    35  	return mock
    36  }
    37  
    38  // EXPECT returns an object that allows the caller to indicate expected use.
    39  func (m *MockPacker) EXPECT() *MockPackerMockRecorder {
    40  	return m.recorder
    41  }
    42  
    43  // AppendPacket mocks base method.
    44  func (m *MockPacker) AppendPacket(arg0 *packetBuffer, arg1 protocol.ByteCount, arg2 protocol.VersionNumber) (shortHeaderPacket, error) {
    45  	m.ctrl.T.Helper()
    46  	ret := m.ctrl.Call(m, "AppendPacket", arg0, arg1, arg2)
    47  	ret0, _ := ret[0].(shortHeaderPacket)
    48  	ret1, _ := ret[1].(error)
    49  	return ret0, ret1
    50  }
    51  
    52  // AppendPacket indicates an expected call of AppendPacket.
    53  func (mr *MockPackerMockRecorder) AppendPacket(arg0, arg1, arg2 any) *gomock.Call {
    54  	mr.mock.ctrl.T.Helper()
    55  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendPacket", reflect.TypeOf((*MockPacker)(nil).AppendPacket), arg0, arg1, arg2)
    56  }
    57  
    58  // MaybePackProbePacket mocks base method.
    59  func (m *MockPacker) MaybePackProbePacket(arg0 protocol.EncryptionLevel, arg1 protocol.ByteCount, arg2 protocol.VersionNumber) (*coalescedPacket, error) {
    60  	m.ctrl.T.Helper()
    61  	ret := m.ctrl.Call(m, "MaybePackProbePacket", arg0, arg1, arg2)
    62  	ret0, _ := ret[0].(*coalescedPacket)
    63  	ret1, _ := ret[1].(error)
    64  	return ret0, ret1
    65  }
    66  
    67  // MaybePackProbePacket indicates an expected call of MaybePackProbePacket.
    68  func (mr *MockPackerMockRecorder) MaybePackProbePacket(arg0, arg1, arg2 any) *gomock.Call {
    69  	mr.mock.ctrl.T.Helper()
    70  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybePackProbePacket", reflect.TypeOf((*MockPacker)(nil).MaybePackProbePacket), arg0, arg1, arg2)
    71  }
    72  
    73  // PackAckOnlyPacket mocks base method.
    74  func (m *MockPacker) PackAckOnlyPacket(arg0 protocol.ByteCount, arg1 protocol.VersionNumber) (shortHeaderPacket, *packetBuffer, error) {
    75  	m.ctrl.T.Helper()
    76  	ret := m.ctrl.Call(m, "PackAckOnlyPacket", arg0, arg1)
    77  	ret0, _ := ret[0].(shortHeaderPacket)
    78  	ret1, _ := ret[1].(*packetBuffer)
    79  	ret2, _ := ret[2].(error)
    80  	return ret0, ret1, ret2
    81  }
    82  
    83  // PackAckOnlyPacket indicates an expected call of PackAckOnlyPacket.
    84  func (mr *MockPackerMockRecorder) PackAckOnlyPacket(arg0, arg1 any) *gomock.Call {
    85  	mr.mock.ctrl.T.Helper()
    86  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackAckOnlyPacket", reflect.TypeOf((*MockPacker)(nil).PackAckOnlyPacket), arg0, arg1)
    87  }
    88  
    89  // PackApplicationClose mocks base method.
    90  func (m *MockPacker) PackApplicationClose(arg0 *qerr.ApplicationError, arg1 protocol.ByteCount, arg2 protocol.VersionNumber) (*coalescedPacket, error) {
    91  	m.ctrl.T.Helper()
    92  	ret := m.ctrl.Call(m, "PackApplicationClose", arg0, arg1, arg2)
    93  	ret0, _ := ret[0].(*coalescedPacket)
    94  	ret1, _ := ret[1].(error)
    95  	return ret0, ret1
    96  }
    97  
    98  // PackApplicationClose indicates an expected call of PackApplicationClose.
    99  func (mr *MockPackerMockRecorder) PackApplicationClose(arg0, arg1, arg2 any) *gomock.Call {
   100  	mr.mock.ctrl.T.Helper()
   101  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackApplicationClose", reflect.TypeOf((*MockPacker)(nil).PackApplicationClose), arg0, arg1, arg2)
   102  }
   103  
   104  // PackCoalescedPacket mocks base method.
   105  func (m *MockPacker) PackCoalescedPacket(arg0 bool, arg1 protocol.ByteCount, arg2 protocol.VersionNumber) (*coalescedPacket, error) {
   106  	m.ctrl.T.Helper()
   107  	ret := m.ctrl.Call(m, "PackCoalescedPacket", arg0, arg1, arg2)
   108  	ret0, _ := ret[0].(*coalescedPacket)
   109  	ret1, _ := ret[1].(error)
   110  	return ret0, ret1
   111  }
   112  
   113  // PackCoalescedPacket indicates an expected call of PackCoalescedPacket.
   114  func (mr *MockPackerMockRecorder) PackCoalescedPacket(arg0, arg1, arg2 any) *gomock.Call {
   115  	mr.mock.ctrl.T.Helper()
   116  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackCoalescedPacket", reflect.TypeOf((*MockPacker)(nil).PackCoalescedPacket), arg0, arg1, arg2)
   117  }
   118  
   119  // PackConnectionClose mocks base method.
   120  func (m *MockPacker) PackConnectionClose(arg0 *qerr.TransportError, arg1 protocol.ByteCount, arg2 protocol.VersionNumber) (*coalescedPacket, error) {
   121  	m.ctrl.T.Helper()
   122  	ret := m.ctrl.Call(m, "PackConnectionClose", arg0, arg1, arg2)
   123  	ret0, _ := ret[0].(*coalescedPacket)
   124  	ret1, _ := ret[1].(error)
   125  	return ret0, ret1
   126  }
   127  
   128  // PackConnectionClose indicates an expected call of PackConnectionClose.
   129  func (mr *MockPackerMockRecorder) PackConnectionClose(arg0, arg1, arg2 any) *gomock.Call {
   130  	mr.mock.ctrl.T.Helper()
   131  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackConnectionClose", reflect.TypeOf((*MockPacker)(nil).PackConnectionClose), arg0, arg1, arg2)
   132  }
   133  
   134  // PackMTUProbePacket mocks base method.
   135  func (m *MockPacker) PackMTUProbePacket(arg0 ackhandler.Frame, arg1 protocol.ByteCount, arg2 protocol.VersionNumber) (shortHeaderPacket, *packetBuffer, error) {
   136  	m.ctrl.T.Helper()
   137  	ret := m.ctrl.Call(m, "PackMTUProbePacket", arg0, arg1, arg2)
   138  	ret0, _ := ret[0].(shortHeaderPacket)
   139  	ret1, _ := ret[1].(*packetBuffer)
   140  	ret2, _ := ret[2].(error)
   141  	return ret0, ret1, ret2
   142  }
   143  
   144  // PackMTUProbePacket indicates an expected call of PackMTUProbePacket.
   145  func (mr *MockPackerMockRecorder) PackMTUProbePacket(arg0, arg1, arg2 any) *gomock.Call {
   146  	mr.mock.ctrl.T.Helper()
   147  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackMTUProbePacket", reflect.TypeOf((*MockPacker)(nil).PackMTUProbePacket), arg0, arg1, arg2)
   148  }
   149  
   150  // SetToken mocks base method.
   151  func (m *MockPacker) SetToken(arg0 []byte) {
   152  	m.ctrl.T.Helper()
   153  	m.ctrl.Call(m, "SetToken", arg0)
   154  }
   155  
   156  // SetToken indicates an expected call of SetToken.
   157  func (mr *MockPackerMockRecorder) SetToken(arg0 any) *gomock.Call {
   158  	mr.mock.ctrl.T.Helper()
   159  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetToken", reflect.TypeOf((*MockPacker)(nil).SetToken), arg0)
   160  }