mock_packet_handler_test.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: github.com/lucas-clemente/quic-go (interfaces: PacketHandler)
  3. // Package quic is a generated GoMock package.
  4. package quic
  5. import (
  6. reflect "reflect"
  7. gomock "github.com/golang/mock/gomock"
  8. protocol "github.com/lucas-clemente/quic-go/internal/protocol"
  9. )
  10. // MockPacketHandler is a mock of PacketHandler interface
  11. type MockPacketHandler struct {
  12. ctrl *gomock.Controller
  13. recorder *MockPacketHandlerMockRecorder
  14. }
  15. // MockPacketHandlerMockRecorder is the mock recorder for MockPacketHandler
  16. type MockPacketHandlerMockRecorder struct {
  17. mock *MockPacketHandler
  18. }
  19. // NewMockPacketHandler creates a new mock instance
  20. func NewMockPacketHandler(ctrl *gomock.Controller) *MockPacketHandler {
  21. mock := &MockPacketHandler{ctrl: ctrl}
  22. mock.recorder = &MockPacketHandlerMockRecorder{mock}
  23. return mock
  24. }
  25. // EXPECT returns an object that allows the caller to indicate expected use
  26. func (m *MockPacketHandler) EXPECT() *MockPacketHandlerMockRecorder {
  27. return m.recorder
  28. }
  29. // Close mocks base method
  30. func (m *MockPacketHandler) Close() error {
  31. m.ctrl.T.Helper()
  32. ret := m.ctrl.Call(m, "Close")
  33. ret0, _ := ret[0].(error)
  34. return ret0
  35. }
  36. // Close indicates an expected call of Close
  37. func (mr *MockPacketHandlerMockRecorder) Close() *gomock.Call {
  38. mr.mock.ctrl.T.Helper()
  39. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPacketHandler)(nil).Close))
  40. }
  41. // destroy mocks base method
  42. func (m *MockPacketHandler) destroy(arg0 error) {
  43. m.ctrl.T.Helper()
  44. m.ctrl.Call(m, "destroy", arg0)
  45. }
  46. // destroy indicates an expected call of destroy
  47. func (mr *MockPacketHandlerMockRecorder) destroy(arg0 interface{}) *gomock.Call {
  48. mr.mock.ctrl.T.Helper()
  49. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockPacketHandler)(nil).destroy), arg0)
  50. }
  51. // getPerspective mocks base method
  52. func (m *MockPacketHandler) getPerspective() protocol.Perspective {
  53. m.ctrl.T.Helper()
  54. ret := m.ctrl.Call(m, "getPerspective")
  55. ret0, _ := ret[0].(protocol.Perspective)
  56. return ret0
  57. }
  58. // getPerspective indicates an expected call of getPerspective
  59. func (mr *MockPacketHandlerMockRecorder) getPerspective() *gomock.Call {
  60. mr.mock.ctrl.T.Helper()
  61. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPerspective", reflect.TypeOf((*MockPacketHandler)(nil).getPerspective))
  62. }
  63. // handlePacket mocks base method
  64. func (m *MockPacketHandler) handlePacket(arg0 *receivedPacket) {
  65. m.ctrl.T.Helper()
  66. m.ctrl.Call(m, "handlePacket", arg0)
  67. }
  68. // handlePacket indicates an expected call of handlePacket
  69. func (mr *MockPacketHandlerMockRecorder) handlePacket(arg0 interface{}) *gomock.Call {
  70. mr.mock.ctrl.T.Helper()
  71. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockPacketHandler)(nil).handlePacket), arg0)
  72. }