mock_packer_test.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: github.com/lucas-clemente/quic-go (interfaces: Packer)
  3. // Package quic is a generated GoMock package.
  4. package quic
  5. import (
  6. reflect "reflect"
  7. gomock "github.com/golang/mock/gomock"
  8. ackhandler "github.com/lucas-clemente/quic-go/internal/ackhandler"
  9. handshake "github.com/lucas-clemente/quic-go/internal/handshake"
  10. protocol "github.com/lucas-clemente/quic-go/internal/protocol"
  11. wire "github.com/lucas-clemente/quic-go/internal/wire"
  12. )
  13. // MockPacker is a mock of Packer interface
  14. type MockPacker struct {
  15. ctrl *gomock.Controller
  16. recorder *MockPackerMockRecorder
  17. }
  18. // MockPackerMockRecorder is the mock recorder for MockPacker
  19. type MockPackerMockRecorder struct {
  20. mock *MockPacker
  21. }
  22. // NewMockPacker creates a new mock instance
  23. func NewMockPacker(ctrl *gomock.Controller) *MockPacker {
  24. mock := &MockPacker{ctrl: ctrl}
  25. mock.recorder = &MockPackerMockRecorder{mock}
  26. return mock
  27. }
  28. // EXPECT returns an object that allows the caller to indicate expected use
  29. func (m *MockPacker) EXPECT() *MockPackerMockRecorder {
  30. return m.recorder
  31. }
  32. // ChangeDestConnectionID mocks base method
  33. func (m *MockPacker) ChangeDestConnectionID(arg0 protocol.ConnectionID) {
  34. m.ctrl.T.Helper()
  35. m.ctrl.Call(m, "ChangeDestConnectionID", arg0)
  36. }
  37. // ChangeDestConnectionID indicates an expected call of ChangeDestConnectionID
  38. func (mr *MockPackerMockRecorder) ChangeDestConnectionID(arg0 interface{}) *gomock.Call {
  39. mr.mock.ctrl.T.Helper()
  40. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeDestConnectionID", reflect.TypeOf((*MockPacker)(nil).ChangeDestConnectionID), arg0)
  41. }
  42. // HandleTransportParameters mocks base method
  43. func (m *MockPacker) HandleTransportParameters(arg0 *handshake.TransportParameters) {
  44. m.ctrl.T.Helper()
  45. m.ctrl.Call(m, "HandleTransportParameters", arg0)
  46. }
  47. // HandleTransportParameters indicates an expected call of HandleTransportParameters
  48. func (mr *MockPackerMockRecorder) HandleTransportParameters(arg0 interface{}) *gomock.Call {
  49. mr.mock.ctrl.T.Helper()
  50. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleTransportParameters", reflect.TypeOf((*MockPacker)(nil).HandleTransportParameters), arg0)
  51. }
  52. // MaybePackAckPacket mocks base method
  53. func (m *MockPacker) MaybePackAckPacket() (*packedPacket, error) {
  54. m.ctrl.T.Helper()
  55. ret := m.ctrl.Call(m, "MaybePackAckPacket")
  56. ret0, _ := ret[0].(*packedPacket)
  57. ret1, _ := ret[1].(error)
  58. return ret0, ret1
  59. }
  60. // MaybePackAckPacket indicates an expected call of MaybePackAckPacket
  61. func (mr *MockPackerMockRecorder) MaybePackAckPacket() *gomock.Call {
  62. mr.mock.ctrl.T.Helper()
  63. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaybePackAckPacket", reflect.TypeOf((*MockPacker)(nil).MaybePackAckPacket))
  64. }
  65. // PackConnectionClose mocks base method
  66. func (m *MockPacker) PackConnectionClose(arg0 *wire.ConnectionCloseFrame) (*packedPacket, error) {
  67. m.ctrl.T.Helper()
  68. ret := m.ctrl.Call(m, "PackConnectionClose", arg0)
  69. ret0, _ := ret[0].(*packedPacket)
  70. ret1, _ := ret[1].(error)
  71. return ret0, ret1
  72. }
  73. // PackConnectionClose indicates an expected call of PackConnectionClose
  74. func (mr *MockPackerMockRecorder) PackConnectionClose(arg0 interface{}) *gomock.Call {
  75. mr.mock.ctrl.T.Helper()
  76. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackConnectionClose", reflect.TypeOf((*MockPacker)(nil).PackConnectionClose), arg0)
  77. }
  78. // PackPacket mocks base method
  79. func (m *MockPacker) PackPacket() (*packedPacket, error) {
  80. m.ctrl.T.Helper()
  81. ret := m.ctrl.Call(m, "PackPacket")
  82. ret0, _ := ret[0].(*packedPacket)
  83. ret1, _ := ret[1].(error)
  84. return ret0, ret1
  85. }
  86. // PackPacket indicates an expected call of PackPacket
  87. func (mr *MockPackerMockRecorder) PackPacket() *gomock.Call {
  88. mr.mock.ctrl.T.Helper()
  89. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackPacket", reflect.TypeOf((*MockPacker)(nil).PackPacket))
  90. }
  91. // PackRetransmission mocks base method
  92. func (m *MockPacker) PackRetransmission(arg0 *ackhandler.Packet) ([]*packedPacket, error) {
  93. m.ctrl.T.Helper()
  94. ret := m.ctrl.Call(m, "PackRetransmission", arg0)
  95. ret0, _ := ret[0].([]*packedPacket)
  96. ret1, _ := ret[1].(error)
  97. return ret0, ret1
  98. }
  99. // PackRetransmission indicates an expected call of PackRetransmission
  100. func (mr *MockPackerMockRecorder) PackRetransmission(arg0 interface{}) *gomock.Call {
  101. mr.mock.ctrl.T.Helper()
  102. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PackRetransmission", reflect.TypeOf((*MockPacker)(nil).PackRetransmission), arg0)
  103. }
  104. // SetToken mocks base method
  105. func (m *MockPacker) SetToken(arg0 []byte) {
  106. m.ctrl.T.Helper()
  107. m.ctrl.Call(m, "SetToken", arg0)
  108. }
  109. // SetToken indicates an expected call of SetToken
  110. func (mr *MockPackerMockRecorder) SetToken(arg0 interface{}) *gomock.Call {
  111. mr.mock.ctrl.T.Helper()
  112. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetToken", reflect.TypeOf((*MockPacker)(nil).SetToken), arg0)
  113. }