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

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/TugasAkhir-QUIC/quic-go (interfaces: Packer)
     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_packer_test.go github.com/TugasAkhir-QUIC/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/TugasAkhir-QUIC/quic-go/internal/ackhandler"
    15  	protocol "github.com/TugasAkhir-QUIC/quic-go/internal/protocol"
    16  	qerr "github.com/TugasAkhir-QUIC/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.Version) (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) *PackerAppendPacketCall {
    54  	mr.mock.ctrl.T.Helper()
    55  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendPacket", reflect.TypeOf((*MockPacker)(nil).AppendPacket), arg0, arg1, arg2)
    56  	return &PackerAppendPacketCall{Call: call}
    57  }
    58  
    59  // PackerAppendPacketCall wrap *gomock.Call
    60  type PackerAppendPacketCall struct {
    61  	*gomock.Call
    62  }
    63  
    64  // Return rewrite *gomock.Call.Return
    65  func (c *PackerAppendPacketCall) Return(arg0 shortHeaderPacket, arg1 error) *PackerAppendPacketCall {
    66  	c.Call = c.Call.Return(arg0, arg1)
    67  	return c
    68  }
    69  
    70  // Do rewrite *gomock.Call.Do
    71  func (c *PackerAppendPacketCall) Do(f func(*packetBuffer, protocol.ByteCount, protocol.Version) (shortHeaderPacket, error)) *PackerAppendPacketCall {
    72  	c.Call = c.Call.Do(f)
    73  	return c
    74  }
    75  
    76  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    77  func (c *PackerAppendPacketCall) DoAndReturn(f func(*packetBuffer, protocol.ByteCount, protocol.Version) (shortHeaderPacket, error)) *PackerAppendPacketCall {
    78  	c.Call = c.Call.DoAndReturn(f)
    79  	return c
    80  }
    81  
    82  // MaybePackProbePacket mocks base method.
    83  func (m *MockPacker) MaybePackProbePacket(arg0 protocol.EncryptionLevel, arg1 protocol.ByteCount, arg2 protocol.Version) (*coalescedPacket, error) {
    84  	m.ctrl.T.Helper()
    85  	ret := m.ctrl.Call(m, "MaybePackProbePacket", arg0, arg1, arg2)
    86  	ret0, _ := ret[0].(*coalescedPacket)
    87  	ret1, _ := ret[1].(error)
    88  	return ret0, ret1
    89  }
    90  
    91  // MaybePackProbePacket indicates an expected call of MaybePackProbePacket.
    92  func (mr *MockPackerMockRecorder) MaybePackProbePacket(arg0, arg1, arg2 any) *PackerMaybePackProbePacketCall {
    93  	mr.mock.ctrl.T.Helper()
    94  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybePackProbePacket", reflect.TypeOf((*MockPacker)(nil).MaybePackProbePacket), arg0, arg1, arg2)
    95  	return &PackerMaybePackProbePacketCall{Call: call}
    96  }
    97  
    98  // PackerMaybePackProbePacketCall wrap *gomock.Call
    99  type PackerMaybePackProbePacketCall struct {
   100  	*gomock.Call
   101  }
   102  
   103  // Return rewrite *gomock.Call.Return
   104  func (c *PackerMaybePackProbePacketCall) Return(arg0 *coalescedPacket, arg1 error) *PackerMaybePackProbePacketCall {
   105  	c.Call = c.Call.Return(arg0, arg1)
   106  	return c
   107  }
   108  
   109  // Do rewrite *gomock.Call.Do
   110  func (c *PackerMaybePackProbePacketCall) Do(f func(protocol.EncryptionLevel, protocol.ByteCount, protocol.Version) (*coalescedPacket, error)) *PackerMaybePackProbePacketCall {
   111  	c.Call = c.Call.Do(f)
   112  	return c
   113  }
   114  
   115  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   116  func (c *PackerMaybePackProbePacketCall) DoAndReturn(f func(protocol.EncryptionLevel, protocol.ByteCount, protocol.Version) (*coalescedPacket, error)) *PackerMaybePackProbePacketCall {
   117  	c.Call = c.Call.DoAndReturn(f)
   118  	return c
   119  }
   120  
   121  // PackAckOnlyPacket mocks base method.
   122  func (m *MockPacker) PackAckOnlyPacket(arg0 protocol.ByteCount, arg1 protocol.Version) (shortHeaderPacket, *packetBuffer, error) {
   123  	m.ctrl.T.Helper()
   124  	ret := m.ctrl.Call(m, "PackAckOnlyPacket", arg0, arg1)
   125  	ret0, _ := ret[0].(shortHeaderPacket)
   126  	ret1, _ := ret[1].(*packetBuffer)
   127  	ret2, _ := ret[2].(error)
   128  	return ret0, ret1, ret2
   129  }
   130  
   131  // PackAckOnlyPacket indicates an expected call of PackAckOnlyPacket.
   132  func (mr *MockPackerMockRecorder) PackAckOnlyPacket(arg0, arg1 any) *PackerPackAckOnlyPacketCall {
   133  	mr.mock.ctrl.T.Helper()
   134  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackAckOnlyPacket", reflect.TypeOf((*MockPacker)(nil).PackAckOnlyPacket), arg0, arg1)
   135  	return &PackerPackAckOnlyPacketCall{Call: call}
   136  }
   137  
   138  // PackerPackAckOnlyPacketCall wrap *gomock.Call
   139  type PackerPackAckOnlyPacketCall struct {
   140  	*gomock.Call
   141  }
   142  
   143  // Return rewrite *gomock.Call.Return
   144  func (c *PackerPackAckOnlyPacketCall) Return(arg0 shortHeaderPacket, arg1 *packetBuffer, arg2 error) *PackerPackAckOnlyPacketCall {
   145  	c.Call = c.Call.Return(arg0, arg1, arg2)
   146  	return c
   147  }
   148  
   149  // Do rewrite *gomock.Call.Do
   150  func (c *PackerPackAckOnlyPacketCall) Do(f func(protocol.ByteCount, protocol.Version) (shortHeaderPacket, *packetBuffer, error)) *PackerPackAckOnlyPacketCall {
   151  	c.Call = c.Call.Do(f)
   152  	return c
   153  }
   154  
   155  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   156  func (c *PackerPackAckOnlyPacketCall) DoAndReturn(f func(protocol.ByteCount, protocol.Version) (shortHeaderPacket, *packetBuffer, error)) *PackerPackAckOnlyPacketCall {
   157  	c.Call = c.Call.DoAndReturn(f)
   158  	return c
   159  }
   160  
   161  // PackApplicationClose mocks base method.
   162  func (m *MockPacker) PackApplicationClose(arg0 *qerr.ApplicationError, arg1 protocol.ByteCount, arg2 protocol.Version) (*coalescedPacket, error) {
   163  	m.ctrl.T.Helper()
   164  	ret := m.ctrl.Call(m, "PackApplicationClose", arg0, arg1, arg2)
   165  	ret0, _ := ret[0].(*coalescedPacket)
   166  	ret1, _ := ret[1].(error)
   167  	return ret0, ret1
   168  }
   169  
   170  // PackApplicationClose indicates an expected call of PackApplicationClose.
   171  func (mr *MockPackerMockRecorder) PackApplicationClose(arg0, arg1, arg2 any) *PackerPackApplicationCloseCall {
   172  	mr.mock.ctrl.T.Helper()
   173  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackApplicationClose", reflect.TypeOf((*MockPacker)(nil).PackApplicationClose), arg0, arg1, arg2)
   174  	return &PackerPackApplicationCloseCall{Call: call}
   175  }
   176  
   177  // PackerPackApplicationCloseCall wrap *gomock.Call
   178  type PackerPackApplicationCloseCall struct {
   179  	*gomock.Call
   180  }
   181  
   182  // Return rewrite *gomock.Call.Return
   183  func (c *PackerPackApplicationCloseCall) Return(arg0 *coalescedPacket, arg1 error) *PackerPackApplicationCloseCall {
   184  	c.Call = c.Call.Return(arg0, arg1)
   185  	return c
   186  }
   187  
   188  // Do rewrite *gomock.Call.Do
   189  func (c *PackerPackApplicationCloseCall) Do(f func(*qerr.ApplicationError, protocol.ByteCount, protocol.Version) (*coalescedPacket, error)) *PackerPackApplicationCloseCall {
   190  	c.Call = c.Call.Do(f)
   191  	return c
   192  }
   193  
   194  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   195  func (c *PackerPackApplicationCloseCall) DoAndReturn(f func(*qerr.ApplicationError, protocol.ByteCount, protocol.Version) (*coalescedPacket, error)) *PackerPackApplicationCloseCall {
   196  	c.Call = c.Call.DoAndReturn(f)
   197  	return c
   198  }
   199  
   200  // PackCoalescedPacket mocks base method.
   201  func (m *MockPacker) PackCoalescedPacket(arg0 bool, arg1 protocol.ByteCount, arg2 protocol.Version) (*coalescedPacket, error) {
   202  	m.ctrl.T.Helper()
   203  	ret := m.ctrl.Call(m, "PackCoalescedPacket", arg0, arg1, arg2)
   204  	ret0, _ := ret[0].(*coalescedPacket)
   205  	ret1, _ := ret[1].(error)
   206  	return ret0, ret1
   207  }
   208  
   209  // PackCoalescedPacket indicates an expected call of PackCoalescedPacket.
   210  func (mr *MockPackerMockRecorder) PackCoalescedPacket(arg0, arg1, arg2 any) *PackerPackCoalescedPacketCall {
   211  	mr.mock.ctrl.T.Helper()
   212  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackCoalescedPacket", reflect.TypeOf((*MockPacker)(nil).PackCoalescedPacket), arg0, arg1, arg2)
   213  	return &PackerPackCoalescedPacketCall{Call: call}
   214  }
   215  
   216  // PackerPackCoalescedPacketCall wrap *gomock.Call
   217  type PackerPackCoalescedPacketCall struct {
   218  	*gomock.Call
   219  }
   220  
   221  // Return rewrite *gomock.Call.Return
   222  func (c *PackerPackCoalescedPacketCall) Return(arg0 *coalescedPacket, arg1 error) *PackerPackCoalescedPacketCall {
   223  	c.Call = c.Call.Return(arg0, arg1)
   224  	return c
   225  }
   226  
   227  // Do rewrite *gomock.Call.Do
   228  func (c *PackerPackCoalescedPacketCall) Do(f func(bool, protocol.ByteCount, protocol.Version) (*coalescedPacket, error)) *PackerPackCoalescedPacketCall {
   229  	c.Call = c.Call.Do(f)
   230  	return c
   231  }
   232  
   233  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   234  func (c *PackerPackCoalescedPacketCall) DoAndReturn(f func(bool, protocol.ByteCount, protocol.Version) (*coalescedPacket, error)) *PackerPackCoalescedPacketCall {
   235  	c.Call = c.Call.DoAndReturn(f)
   236  	return c
   237  }
   238  
   239  // PackConnectionClose mocks base method.
   240  func (m *MockPacker) PackConnectionClose(arg0 *qerr.TransportError, arg1 protocol.ByteCount, arg2 protocol.Version) (*coalescedPacket, error) {
   241  	m.ctrl.T.Helper()
   242  	ret := m.ctrl.Call(m, "PackConnectionClose", arg0, arg1, arg2)
   243  	ret0, _ := ret[0].(*coalescedPacket)
   244  	ret1, _ := ret[1].(error)
   245  	return ret0, ret1
   246  }
   247  
   248  // PackConnectionClose indicates an expected call of PackConnectionClose.
   249  func (mr *MockPackerMockRecorder) PackConnectionClose(arg0, arg1, arg2 any) *PackerPackConnectionCloseCall {
   250  	mr.mock.ctrl.T.Helper()
   251  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackConnectionClose", reflect.TypeOf((*MockPacker)(nil).PackConnectionClose), arg0, arg1, arg2)
   252  	return &PackerPackConnectionCloseCall{Call: call}
   253  }
   254  
   255  // PackerPackConnectionCloseCall wrap *gomock.Call
   256  type PackerPackConnectionCloseCall struct {
   257  	*gomock.Call
   258  }
   259  
   260  // Return rewrite *gomock.Call.Return
   261  func (c *PackerPackConnectionCloseCall) Return(arg0 *coalescedPacket, arg1 error) *PackerPackConnectionCloseCall {
   262  	c.Call = c.Call.Return(arg0, arg1)
   263  	return c
   264  }
   265  
   266  // Do rewrite *gomock.Call.Do
   267  func (c *PackerPackConnectionCloseCall) Do(f func(*qerr.TransportError, protocol.ByteCount, protocol.Version) (*coalescedPacket, error)) *PackerPackConnectionCloseCall {
   268  	c.Call = c.Call.Do(f)
   269  	return c
   270  }
   271  
   272  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   273  func (c *PackerPackConnectionCloseCall) DoAndReturn(f func(*qerr.TransportError, protocol.ByteCount, protocol.Version) (*coalescedPacket, error)) *PackerPackConnectionCloseCall {
   274  	c.Call = c.Call.DoAndReturn(f)
   275  	return c
   276  }
   277  
   278  // PackMTUProbePacket mocks base method.
   279  func (m *MockPacker) PackMTUProbePacket(arg0 ackhandler.Frame, arg1 protocol.ByteCount, arg2 protocol.Version) (shortHeaderPacket, *packetBuffer, error) {
   280  	m.ctrl.T.Helper()
   281  	ret := m.ctrl.Call(m, "PackMTUProbePacket", arg0, arg1, arg2)
   282  	ret0, _ := ret[0].(shortHeaderPacket)
   283  	ret1, _ := ret[1].(*packetBuffer)
   284  	ret2, _ := ret[2].(error)
   285  	return ret0, ret1, ret2
   286  }
   287  
   288  // PackMTUProbePacket indicates an expected call of PackMTUProbePacket.
   289  func (mr *MockPackerMockRecorder) PackMTUProbePacket(arg0, arg1, arg2 any) *PackerPackMTUProbePacketCall {
   290  	mr.mock.ctrl.T.Helper()
   291  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackMTUProbePacket", reflect.TypeOf((*MockPacker)(nil).PackMTUProbePacket), arg0, arg1, arg2)
   292  	return &PackerPackMTUProbePacketCall{Call: call}
   293  }
   294  
   295  // PackerPackMTUProbePacketCall wrap *gomock.Call
   296  type PackerPackMTUProbePacketCall struct {
   297  	*gomock.Call
   298  }
   299  
   300  // Return rewrite *gomock.Call.Return
   301  func (c *PackerPackMTUProbePacketCall) Return(arg0 shortHeaderPacket, arg1 *packetBuffer, arg2 error) *PackerPackMTUProbePacketCall {
   302  	c.Call = c.Call.Return(arg0, arg1, arg2)
   303  	return c
   304  }
   305  
   306  // Do rewrite *gomock.Call.Do
   307  func (c *PackerPackMTUProbePacketCall) Do(f func(ackhandler.Frame, protocol.ByteCount, protocol.Version) (shortHeaderPacket, *packetBuffer, error)) *PackerPackMTUProbePacketCall {
   308  	c.Call = c.Call.Do(f)
   309  	return c
   310  }
   311  
   312  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   313  func (c *PackerPackMTUProbePacketCall) DoAndReturn(f func(ackhandler.Frame, protocol.ByteCount, protocol.Version) (shortHeaderPacket, *packetBuffer, error)) *PackerPackMTUProbePacketCall {
   314  	c.Call = c.Call.DoAndReturn(f)
   315  	return c
   316  }
   317  
   318  // SetToken mocks base method.
   319  func (m *MockPacker) SetToken(arg0 []byte) {
   320  	m.ctrl.T.Helper()
   321  	m.ctrl.Call(m, "SetToken", arg0)
   322  }
   323  
   324  // SetToken indicates an expected call of SetToken.
   325  func (mr *MockPackerMockRecorder) SetToken(arg0 any) *PackerSetTokenCall {
   326  	mr.mock.ctrl.T.Helper()
   327  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetToken", reflect.TypeOf((*MockPacker)(nil).SetToken), arg0)
   328  	return &PackerSetTokenCall{Call: call}
   329  }
   330  
   331  // PackerSetTokenCall wrap *gomock.Call
   332  type PackerSetTokenCall struct {
   333  	*gomock.Call
   334  }
   335  
   336  // Return rewrite *gomock.Call.Return
   337  func (c *PackerSetTokenCall) Return() *PackerSetTokenCall {
   338  	c.Call = c.Call.Return()
   339  	return c
   340  }
   341  
   342  // Do rewrite *gomock.Call.Do
   343  func (c *PackerSetTokenCall) Do(f func([]byte)) *PackerSetTokenCall {
   344  	c.Call = c.Call.Do(f)
   345  	return c
   346  }
   347  
   348  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   349  func (c *PackerSetTokenCall) DoAndReturn(f func([]byte)) *PackerSetTokenCall {
   350  	c.Call = c.Call.DoAndReturn(f)
   351  	return c
   352  }