github.com/danielpfeifer02/quic-go-prio-packs@v0.41.0-28/mock_packet_handler_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/danielpfeifer02/quic-go-prio-packs (interfaces: PacketHandler) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/danielpfeifer02/quic-go-prio-packs -destination mock_packet_handler_test.go github.com/danielpfeifer02/quic-go-prio-packs PacketHandler 7 // 8 // Package quic is a generated GoMock package. 9 package quic 10 11 import ( 12 reflect "reflect" 13 14 qerr "github.com/danielpfeifer02/quic-go-prio-packs/internal/qerr" 15 gomock "go.uber.org/mock/gomock" 16 ) 17 18 // MockPacketHandler is a mock of PacketHandler interface. 19 type MockPacketHandler struct { 20 ctrl *gomock.Controller 21 recorder *MockPacketHandlerMockRecorder 22 } 23 24 // MockPacketHandlerMockRecorder is the mock recorder for MockPacketHandler. 25 type MockPacketHandlerMockRecorder struct { 26 mock *MockPacketHandler 27 } 28 29 // NewMockPacketHandler creates a new mock instance. 30 func NewMockPacketHandler(ctrl *gomock.Controller) *MockPacketHandler { 31 mock := &MockPacketHandler{ctrl: ctrl} 32 mock.recorder = &MockPacketHandlerMockRecorder{mock} 33 return mock 34 } 35 36 // EXPECT returns an object that allows the caller to indicate expected use. 37 func (m *MockPacketHandler) EXPECT() *MockPacketHandlerMockRecorder { 38 return m.recorder 39 } 40 41 // closeWithTransportError mocks base method. 42 func (m *MockPacketHandler) closeWithTransportError(arg0 qerr.TransportErrorCode) { 43 m.ctrl.T.Helper() 44 m.ctrl.Call(m, "closeWithTransportError", arg0) 45 } 46 47 // closeWithTransportError indicates an expected call of closeWithTransportError. 48 func (mr *MockPacketHandlerMockRecorder) closeWithTransportError(arg0 any) *PacketHandlercloseWithTransportErrorCall { 49 mr.mock.ctrl.T.Helper() 50 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeWithTransportError", reflect.TypeOf((*MockPacketHandler)(nil).closeWithTransportError), arg0) 51 return &PacketHandlercloseWithTransportErrorCall{Call: call} 52 } 53 54 // PacketHandlercloseWithTransportErrorCall wrap *gomock.Call 55 type PacketHandlercloseWithTransportErrorCall struct { 56 *gomock.Call 57 } 58 59 // Return rewrite *gomock.Call.Return 60 func (c *PacketHandlercloseWithTransportErrorCall) Return() *PacketHandlercloseWithTransportErrorCall { 61 c.Call = c.Call.Return() 62 return c 63 } 64 65 // Do rewrite *gomock.Call.Do 66 func (c *PacketHandlercloseWithTransportErrorCall) Do(f func(qerr.TransportErrorCode)) *PacketHandlercloseWithTransportErrorCall { 67 c.Call = c.Call.Do(f) 68 return c 69 } 70 71 // DoAndReturn rewrite *gomock.Call.DoAndReturn 72 func (c *PacketHandlercloseWithTransportErrorCall) DoAndReturn(f func(qerr.TransportErrorCode)) *PacketHandlercloseWithTransportErrorCall { 73 c.Call = c.Call.DoAndReturn(f) 74 return c 75 } 76 77 // destroy mocks base method. 78 func (m *MockPacketHandler) destroy(arg0 error) { 79 m.ctrl.T.Helper() 80 m.ctrl.Call(m, "destroy", arg0) 81 } 82 83 // destroy indicates an expected call of destroy. 84 func (mr *MockPacketHandlerMockRecorder) destroy(arg0 any) *PacketHandlerdestroyCall { 85 mr.mock.ctrl.T.Helper() 86 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockPacketHandler)(nil).destroy), arg0) 87 return &PacketHandlerdestroyCall{Call: call} 88 } 89 90 // PacketHandlerdestroyCall wrap *gomock.Call 91 type PacketHandlerdestroyCall struct { 92 *gomock.Call 93 } 94 95 // Return rewrite *gomock.Call.Return 96 func (c *PacketHandlerdestroyCall) Return() *PacketHandlerdestroyCall { 97 c.Call = c.Call.Return() 98 return c 99 } 100 101 // Do rewrite *gomock.Call.Do 102 func (c *PacketHandlerdestroyCall) Do(f func(error)) *PacketHandlerdestroyCall { 103 c.Call = c.Call.Do(f) 104 return c 105 } 106 107 // DoAndReturn rewrite *gomock.Call.DoAndReturn 108 func (c *PacketHandlerdestroyCall) DoAndReturn(f func(error)) *PacketHandlerdestroyCall { 109 c.Call = c.Call.DoAndReturn(f) 110 return c 111 } 112 113 // handlePacket mocks base method. 114 func (m *MockPacketHandler) handlePacket(arg0 receivedPacket) { 115 m.ctrl.T.Helper() 116 m.ctrl.Call(m, "handlePacket", arg0) 117 } 118 119 // handlePacket indicates an expected call of handlePacket. 120 func (mr *MockPacketHandlerMockRecorder) handlePacket(arg0 any) *PacketHandlerhandlePacketCall { 121 mr.mock.ctrl.T.Helper() 122 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockPacketHandler)(nil).handlePacket), arg0) 123 return &PacketHandlerhandlePacketCall{Call: call} 124 } 125 126 // PacketHandlerhandlePacketCall wrap *gomock.Call 127 type PacketHandlerhandlePacketCall struct { 128 *gomock.Call 129 } 130 131 // Return rewrite *gomock.Call.Return 132 func (c *PacketHandlerhandlePacketCall) Return() *PacketHandlerhandlePacketCall { 133 c.Call = c.Call.Return() 134 return c 135 } 136 137 // Do rewrite *gomock.Call.Do 138 func (c *PacketHandlerhandlePacketCall) Do(f func(receivedPacket)) *PacketHandlerhandlePacketCall { 139 c.Call = c.Call.Do(f) 140 return c 141 } 142 143 // DoAndReturn rewrite *gomock.Call.DoAndReturn 144 func (c *PacketHandlerhandlePacketCall) DoAndReturn(f func(receivedPacket)) *PacketHandlerhandlePacketCall { 145 c.Call = c.Call.DoAndReturn(f) 146 return c 147 }