github.com/metacubex/quic-go@v0.44.1-0.20240520163451-20b689a59136/mock_send_conn_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/metacubex/quic-go (interfaces: SendConn) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/metacubex/quic-go -destination mock_send_conn_test.go github.com/metacubex/quic-go SendConn 7 // 8 9 // Package quic is a generated GoMock package. 10 package quic 11 12 import ( 13 net "net" 14 reflect "reflect" 15 16 protocol "github.com/metacubex/quic-go/internal/protocol" 17 gomock "go.uber.org/mock/gomock" 18 ) 19 20 // MockSendConn is a mock of SendConn interface. 21 type MockSendConn struct { 22 ctrl *gomock.Controller 23 recorder *MockSendConnMockRecorder 24 } 25 26 // MockSendConnMockRecorder is the mock recorder for MockSendConn. 27 type MockSendConnMockRecorder struct { 28 mock *MockSendConn 29 } 30 31 // NewMockSendConn creates a new mock instance. 32 func NewMockSendConn(ctrl *gomock.Controller) *MockSendConn { 33 mock := &MockSendConn{ctrl: ctrl} 34 mock.recorder = &MockSendConnMockRecorder{mock} 35 return mock 36 } 37 38 // EXPECT returns an object that allows the caller to indicate expected use. 39 func (m *MockSendConn) EXPECT() *MockSendConnMockRecorder { 40 return m.recorder 41 } 42 43 // Close mocks base method. 44 func (m *MockSendConn) Close() error { 45 m.ctrl.T.Helper() 46 ret := m.ctrl.Call(m, "Close") 47 ret0, _ := ret[0].(error) 48 return ret0 49 } 50 51 // Close indicates an expected call of Close. 52 func (mr *MockSendConnMockRecorder) Close() *MockSendConnCloseCall { 53 mr.mock.ctrl.T.Helper() 54 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSendConn)(nil).Close)) 55 return &MockSendConnCloseCall{Call: call} 56 } 57 58 // MockSendConnCloseCall wrap *gomock.Call 59 type MockSendConnCloseCall struct { 60 *gomock.Call 61 } 62 63 // Return rewrite *gomock.Call.Return 64 func (c *MockSendConnCloseCall) Return(arg0 error) *MockSendConnCloseCall { 65 c.Call = c.Call.Return(arg0) 66 return c 67 } 68 69 // Do rewrite *gomock.Call.Do 70 func (c *MockSendConnCloseCall) Do(f func() error) *MockSendConnCloseCall { 71 c.Call = c.Call.Do(f) 72 return c 73 } 74 75 // DoAndReturn rewrite *gomock.Call.DoAndReturn 76 func (c *MockSendConnCloseCall) DoAndReturn(f func() error) *MockSendConnCloseCall { 77 c.Call = c.Call.DoAndReturn(f) 78 return c 79 } 80 81 // LocalAddr mocks base method. 82 func (m *MockSendConn) LocalAddr() net.Addr { 83 m.ctrl.T.Helper() 84 ret := m.ctrl.Call(m, "LocalAddr") 85 ret0, _ := ret[0].(net.Addr) 86 return ret0 87 } 88 89 // LocalAddr indicates an expected call of LocalAddr. 90 func (mr *MockSendConnMockRecorder) LocalAddr() *MockSendConnLocalAddrCall { 91 mr.mock.ctrl.T.Helper() 92 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockSendConn)(nil).LocalAddr)) 93 return &MockSendConnLocalAddrCall{Call: call} 94 } 95 96 // MockSendConnLocalAddrCall wrap *gomock.Call 97 type MockSendConnLocalAddrCall struct { 98 *gomock.Call 99 } 100 101 // Return rewrite *gomock.Call.Return 102 func (c *MockSendConnLocalAddrCall) Return(arg0 net.Addr) *MockSendConnLocalAddrCall { 103 c.Call = c.Call.Return(arg0) 104 return c 105 } 106 107 // Do rewrite *gomock.Call.Do 108 func (c *MockSendConnLocalAddrCall) Do(f func() net.Addr) *MockSendConnLocalAddrCall { 109 c.Call = c.Call.Do(f) 110 return c 111 } 112 113 // DoAndReturn rewrite *gomock.Call.DoAndReturn 114 func (c *MockSendConnLocalAddrCall) DoAndReturn(f func() net.Addr) *MockSendConnLocalAddrCall { 115 c.Call = c.Call.DoAndReturn(f) 116 return c 117 } 118 119 // RemoteAddr mocks base method. 120 func (m *MockSendConn) RemoteAddr() net.Addr { 121 m.ctrl.T.Helper() 122 ret := m.ctrl.Call(m, "RemoteAddr") 123 ret0, _ := ret[0].(net.Addr) 124 return ret0 125 } 126 127 // RemoteAddr indicates an expected call of RemoteAddr. 128 func (mr *MockSendConnMockRecorder) RemoteAddr() *MockSendConnRemoteAddrCall { 129 mr.mock.ctrl.T.Helper() 130 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockSendConn)(nil).RemoteAddr)) 131 return &MockSendConnRemoteAddrCall{Call: call} 132 } 133 134 // MockSendConnRemoteAddrCall wrap *gomock.Call 135 type MockSendConnRemoteAddrCall struct { 136 *gomock.Call 137 } 138 139 // Return rewrite *gomock.Call.Return 140 func (c *MockSendConnRemoteAddrCall) Return(arg0 net.Addr) *MockSendConnRemoteAddrCall { 141 c.Call = c.Call.Return(arg0) 142 return c 143 } 144 145 // Do rewrite *gomock.Call.Do 146 func (c *MockSendConnRemoteAddrCall) Do(f func() net.Addr) *MockSendConnRemoteAddrCall { 147 c.Call = c.Call.Do(f) 148 return c 149 } 150 151 // DoAndReturn rewrite *gomock.Call.DoAndReturn 152 func (c *MockSendConnRemoteAddrCall) DoAndReturn(f func() net.Addr) *MockSendConnRemoteAddrCall { 153 c.Call = c.Call.DoAndReturn(f) 154 return c 155 } 156 157 // SetRemoteAddr mocks base method. 158 func (m *MockSendConn) SetRemoteAddr(arg0 net.Addr) { 159 m.ctrl.T.Helper() 160 m.ctrl.Call(m, "SetRemoteAddr", arg0) 161 } 162 163 // SetRemoteAddr indicates an expected call of SetRemoteAddr. 164 func (mr *MockSendConnMockRecorder) SetRemoteAddr(arg0 interface{}) *gomock.Call { 165 mr.mock.ctrl.T.Helper() 166 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRemoteAddr", reflect.TypeOf((*MockSendConn)(nil).SetRemoteAddr), arg0) 167 } 168 169 // Write mocks base method. 170 func (m *MockSendConn) Write(arg0 []byte, arg1 uint16, arg2 protocol.ECN) error { 171 m.ctrl.T.Helper() 172 ret := m.ctrl.Call(m, "Write", arg0, arg1, arg2) 173 ret0, _ := ret[0].(error) 174 return ret0 175 } 176 177 // Write indicates an expected call of Write. 178 func (mr *MockSendConnMockRecorder) Write(arg0, arg1, arg2 any) *MockSendConnWriteCall { 179 mr.mock.ctrl.T.Helper() 180 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendConn)(nil).Write), arg0, arg1, arg2) 181 return &MockSendConnWriteCall{Call: call} 182 } 183 184 // MockSendConnWriteCall wrap *gomock.Call 185 type MockSendConnWriteCall struct { 186 *gomock.Call 187 } 188 189 // Return rewrite *gomock.Call.Return 190 func (c *MockSendConnWriteCall) Return(arg0 error) *MockSendConnWriteCall { 191 c.Call = c.Call.Return(arg0) 192 return c 193 } 194 195 // Do rewrite *gomock.Call.Do 196 func (c *MockSendConnWriteCall) Do(f func([]byte, uint16, protocol.ECN) error) *MockSendConnWriteCall { 197 c.Call = c.Call.Do(f) 198 return c 199 } 200 201 // DoAndReturn rewrite *gomock.Call.DoAndReturn 202 func (c *MockSendConnWriteCall) DoAndReturn(f func([]byte, uint16, protocol.ECN) error) *MockSendConnWriteCall { 203 c.Call = c.Call.DoAndReturn(f) 204 return c 205 } 206 207 // capabilities mocks base method. 208 func (m *MockSendConn) capabilities() connCapabilities { 209 m.ctrl.T.Helper() 210 ret := m.ctrl.Call(m, "capabilities") 211 ret0, _ := ret[0].(connCapabilities) 212 return ret0 213 } 214 215 // capabilities indicates an expected call of capabilities. 216 func (mr *MockSendConnMockRecorder) capabilities() *MockSendConncapabilitiesCall { 217 mr.mock.ctrl.T.Helper() 218 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "capabilities", reflect.TypeOf((*MockSendConn)(nil).capabilities)) 219 return &MockSendConncapabilitiesCall{Call: call} 220 } 221 222 // MockSendConncapabilitiesCall wrap *gomock.Call 223 type MockSendConncapabilitiesCall struct { 224 *gomock.Call 225 } 226 227 // Return rewrite *gomock.Call.Return 228 func (c *MockSendConncapabilitiesCall) Return(arg0 connCapabilities) *MockSendConncapabilitiesCall { 229 c.Call = c.Call.Return(arg0) 230 return c 231 } 232 233 // Do rewrite *gomock.Call.Do 234 func (c *MockSendConncapabilitiesCall) Do(f func() connCapabilities) *MockSendConncapabilitiesCall { 235 c.Call = c.Call.Do(f) 236 return c 237 } 238 239 // DoAndReturn rewrite *gomock.Call.DoAndReturn 240 func (c *MockSendConncapabilitiesCall) DoAndReturn(f func() connCapabilities) *MockSendConncapabilitiesCall { 241 c.Call = c.Call.DoAndReturn(f) 242 return c 243 }