github.com/MerlinKodo/quic-go@v0.39.2/mock_packetconn_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: net (interfaces: PacketConn) 3 // 4 // Generated by this command: 5 // 6 // mockgen -package quic -self_package github.com/MerlinKodo/quic-go -self_package github.com/MerlinKodo/quic-go -destination mock_packetconn_test.go net PacketConn 7 // 8 // Package quic is a generated GoMock package. 9 package quic 10 11 import ( 12 net "net" 13 reflect "reflect" 14 time "time" 15 16 gomock "go.uber.org/mock/gomock" 17 ) 18 19 // MockPacketConn is a mock of PacketConn interface. 20 type MockPacketConn struct { 21 ctrl *gomock.Controller 22 recorder *MockPacketConnMockRecorder 23 } 24 25 // MockPacketConnMockRecorder is the mock recorder for MockPacketConn. 26 type MockPacketConnMockRecorder struct { 27 mock *MockPacketConn 28 } 29 30 // NewMockPacketConn creates a new mock instance. 31 func NewMockPacketConn(ctrl *gomock.Controller) *MockPacketConn { 32 mock := &MockPacketConn{ctrl: ctrl} 33 mock.recorder = &MockPacketConnMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockPacketConn) EXPECT() *MockPacketConnMockRecorder { 39 return m.recorder 40 } 41 42 // Close mocks base method. 43 func (m *MockPacketConn) Close() error { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "Close") 46 ret0, _ := ret[0].(error) 47 return ret0 48 } 49 50 // Close indicates an expected call of Close. 51 func (mr *MockPacketConnMockRecorder) Close() *gomock.Call { 52 mr.mock.ctrl.T.Helper() 53 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPacketConn)(nil).Close)) 54 } 55 56 // LocalAddr mocks base method. 57 func (m *MockPacketConn) LocalAddr() net.Addr { 58 m.ctrl.T.Helper() 59 ret := m.ctrl.Call(m, "LocalAddr") 60 ret0, _ := ret[0].(net.Addr) 61 return ret0 62 } 63 64 // LocalAddr indicates an expected call of LocalAddr. 65 func (mr *MockPacketConnMockRecorder) LocalAddr() *gomock.Call { 66 mr.mock.ctrl.T.Helper() 67 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockPacketConn)(nil).LocalAddr)) 68 } 69 70 // ReadFrom mocks base method. 71 func (m *MockPacketConn) ReadFrom(arg0 []byte) (int, net.Addr, error) { 72 m.ctrl.T.Helper() 73 ret := m.ctrl.Call(m, "ReadFrom", arg0) 74 ret0, _ := ret[0].(int) 75 ret1, _ := ret[1].(net.Addr) 76 ret2, _ := ret[2].(error) 77 return ret0, ret1, ret2 78 } 79 80 // ReadFrom indicates an expected call of ReadFrom. 81 func (mr *MockPacketConnMockRecorder) ReadFrom(arg0 any) *gomock.Call { 82 mr.mock.ctrl.T.Helper() 83 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadFrom", reflect.TypeOf((*MockPacketConn)(nil).ReadFrom), arg0) 84 } 85 86 // SetDeadline mocks base method. 87 func (m *MockPacketConn) SetDeadline(arg0 time.Time) error { 88 m.ctrl.T.Helper() 89 ret := m.ctrl.Call(m, "SetDeadline", arg0) 90 ret0, _ := ret[0].(error) 91 return ret0 92 } 93 94 // SetDeadline indicates an expected call of SetDeadline. 95 func (mr *MockPacketConnMockRecorder) SetDeadline(arg0 any) *gomock.Call { 96 mr.mock.ctrl.T.Helper() 97 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockPacketConn)(nil).SetDeadline), arg0) 98 } 99 100 // SetReadDeadline mocks base method. 101 func (m *MockPacketConn) SetReadDeadline(arg0 time.Time) error { 102 m.ctrl.T.Helper() 103 ret := m.ctrl.Call(m, "SetReadDeadline", arg0) 104 ret0, _ := ret[0].(error) 105 return ret0 106 } 107 108 // SetReadDeadline indicates an expected call of SetReadDeadline. 109 func (mr *MockPacketConnMockRecorder) SetReadDeadline(arg0 any) *gomock.Call { 110 mr.mock.ctrl.T.Helper() 111 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockPacketConn)(nil).SetReadDeadline), arg0) 112 } 113 114 // SetWriteDeadline mocks base method. 115 func (m *MockPacketConn) SetWriteDeadline(arg0 time.Time) error { 116 m.ctrl.T.Helper() 117 ret := m.ctrl.Call(m, "SetWriteDeadline", arg0) 118 ret0, _ := ret[0].(error) 119 return ret0 120 } 121 122 // SetWriteDeadline indicates an expected call of SetWriteDeadline. 123 func (mr *MockPacketConnMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call { 124 mr.mock.ctrl.T.Helper() 125 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockPacketConn)(nil).SetWriteDeadline), arg0) 126 } 127 128 // WriteTo mocks base method. 129 func (m *MockPacketConn) WriteTo(arg0 []byte, arg1 net.Addr) (int, error) { 130 m.ctrl.T.Helper() 131 ret := m.ctrl.Call(m, "WriteTo", arg0, arg1) 132 ret0, _ := ret[0].(int) 133 ret1, _ := ret[1].(error) 134 return ret0, ret1 135 } 136 137 // WriteTo indicates an expected call of WriteTo. 138 func (mr *MockPacketConnMockRecorder) WriteTo(arg0, arg1 any) *gomock.Call { 139 mr.mock.ctrl.T.Helper() 140 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteTo", reflect.TypeOf((*MockPacketConn)(nil).WriteTo), arg0, arg1) 141 }