github.com/TugasAkhir-QUIC/quic-go@v0.0.2-0.20240215011318-d20e25a9054c/mock_send_stream_internal_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/TugasAkhir-QUIC/quic-go (interfaces: SendStreamI) 3 // 4 // Generated by this command: 5 // 6 // mockgen.exe -typed -build_flags=-tags=gomock -package quic -self_package github.com/TugasAkhir-QUIC/quic-go -destination mock_send_stream_internal_test.go github.com/TugasAkhir-QUIC/quic-go SendStreamI 7 // 8 // Package quic is a generated GoMock package. 9 package quic 10 11 import ( 12 context "context" 13 reflect "reflect" 14 time "time" 15 16 ackhandler "github.com/TugasAkhir-QUIC/quic-go/internal/ackhandler" 17 protocol "github.com/TugasAkhir-QUIC/quic-go/internal/protocol" 18 qerr "github.com/TugasAkhir-QUIC/quic-go/internal/qerr" 19 wire "github.com/TugasAkhir-QUIC/quic-go/internal/wire" 20 gomock "go.uber.org/mock/gomock" 21 ) 22 23 // MockSendStreamI is a mock of SendStreamI interface. 24 type MockSendStreamI struct { 25 ctrl *gomock.Controller 26 recorder *MockSendStreamIMockRecorder 27 } 28 29 // MockSendStreamIMockRecorder is the mock recorder for MockSendStreamI. 30 type MockSendStreamIMockRecorder struct { 31 mock *MockSendStreamI 32 } 33 34 // NewMockSendStreamI creates a new mock instance. 35 func NewMockSendStreamI(ctrl *gomock.Controller) *MockSendStreamI { 36 mock := &MockSendStreamI{ctrl: ctrl} 37 mock.recorder = &MockSendStreamIMockRecorder{mock} 38 return mock 39 } 40 41 // EXPECT returns an object that allows the caller to indicate expected use. 42 func (m *MockSendStreamI) EXPECT() *MockSendStreamIMockRecorder { 43 return m.recorder 44 } 45 46 // CancelWrite mocks base method. 47 func (m *MockSendStreamI) CancelWrite(arg0 qerr.StreamErrorCode) { 48 m.ctrl.T.Helper() 49 m.ctrl.Call(m, "CancelWrite", arg0) 50 } 51 52 // CancelWrite indicates an expected call of CancelWrite. 53 func (mr *MockSendStreamIMockRecorder) CancelWrite(arg0 any) *SendStreamICancelWriteCall { 54 mr.mock.ctrl.T.Helper() 55 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWrite", reflect.TypeOf((*MockSendStreamI)(nil).CancelWrite), arg0) 56 return &SendStreamICancelWriteCall{Call: call} 57 } 58 59 // SendStreamICancelWriteCall wrap *gomock.Call 60 type SendStreamICancelWriteCall struct { 61 *gomock.Call 62 } 63 64 // Return rewrite *gomock.Call.Return 65 func (c *SendStreamICancelWriteCall) Return() *SendStreamICancelWriteCall { 66 c.Call = c.Call.Return() 67 return c 68 } 69 70 // Do rewrite *gomock.Call.Do 71 func (c *SendStreamICancelWriteCall) Do(f func(qerr.StreamErrorCode)) *SendStreamICancelWriteCall { 72 c.Call = c.Call.Do(f) 73 return c 74 } 75 76 // DoAndReturn rewrite *gomock.Call.DoAndReturn 77 func (c *SendStreamICancelWriteCall) DoAndReturn(f func(qerr.StreamErrorCode)) *SendStreamICancelWriteCall { 78 c.Call = c.Call.DoAndReturn(f) 79 return c 80 } 81 82 // Close mocks base method. 83 func (m *MockSendStreamI) Close() error { 84 m.ctrl.T.Helper() 85 ret := m.ctrl.Call(m, "Close") 86 ret0, _ := ret[0].(error) 87 return ret0 88 } 89 90 // Close indicates an expected call of Close. 91 func (mr *MockSendStreamIMockRecorder) Close() *SendStreamICloseCall { 92 mr.mock.ctrl.T.Helper() 93 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSendStreamI)(nil).Close)) 94 return &SendStreamICloseCall{Call: call} 95 } 96 97 // SendStreamICloseCall wrap *gomock.Call 98 type SendStreamICloseCall struct { 99 *gomock.Call 100 } 101 102 // Return rewrite *gomock.Call.Return 103 func (c *SendStreamICloseCall) Return(arg0 error) *SendStreamICloseCall { 104 c.Call = c.Call.Return(arg0) 105 return c 106 } 107 108 // Do rewrite *gomock.Call.Do 109 func (c *SendStreamICloseCall) Do(f func() error) *SendStreamICloseCall { 110 c.Call = c.Call.Do(f) 111 return c 112 } 113 114 // DoAndReturn rewrite *gomock.Call.DoAndReturn 115 func (c *SendStreamICloseCall) DoAndReturn(f func() error) *SendStreamICloseCall { 116 c.Call = c.Call.DoAndReturn(f) 117 return c 118 } 119 120 // Context mocks base method. 121 func (m *MockSendStreamI) Context() context.Context { 122 m.ctrl.T.Helper() 123 ret := m.ctrl.Call(m, "Context") 124 ret0, _ := ret[0].(context.Context) 125 return ret0 126 } 127 128 // Context indicates an expected call of Context. 129 func (mr *MockSendStreamIMockRecorder) Context() *SendStreamIContextCall { 130 mr.mock.ctrl.T.Helper() 131 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockSendStreamI)(nil).Context)) 132 return &SendStreamIContextCall{Call: call} 133 } 134 135 // SendStreamIContextCall wrap *gomock.Call 136 type SendStreamIContextCall struct { 137 *gomock.Call 138 } 139 140 // Return rewrite *gomock.Call.Return 141 func (c *SendStreamIContextCall) Return(arg0 context.Context) *SendStreamIContextCall { 142 c.Call = c.Call.Return(arg0) 143 return c 144 } 145 146 // Do rewrite *gomock.Call.Do 147 func (c *SendStreamIContextCall) Do(f func() context.Context) *SendStreamIContextCall { 148 c.Call = c.Call.Do(f) 149 return c 150 } 151 152 // DoAndReturn rewrite *gomock.Call.DoAndReturn 153 func (c *SendStreamIContextCall) DoAndReturn(f func() context.Context) *SendStreamIContextCall { 154 c.Call = c.Call.DoAndReturn(f) 155 return c 156 } 157 158 // SetPriority mocks base method. 159 func (m *MockSendStreamI) SetPriority(arg0 int) { 160 m.ctrl.T.Helper() 161 m.ctrl.Call(m, "SetPriority", arg0) 162 } 163 164 // SetPriority indicates an expected call of SetPriority. 165 func (mr *MockSendStreamIMockRecorder) SetPriority(arg0 any) *SendStreamISetPriorityCall { 166 mr.mock.ctrl.T.Helper() 167 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPriority", reflect.TypeOf((*MockSendStreamI)(nil).SetPriority), arg0) 168 return &SendStreamISetPriorityCall{Call: call} 169 } 170 171 // SendStreamISetPriorityCall wrap *gomock.Call 172 type SendStreamISetPriorityCall struct { 173 *gomock.Call 174 } 175 176 // Return rewrite *gomock.Call.Return 177 func (c *SendStreamISetPriorityCall) Return() *SendStreamISetPriorityCall { 178 c.Call = c.Call.Return() 179 return c 180 } 181 182 // Do rewrite *gomock.Call.Do 183 func (c *SendStreamISetPriorityCall) Do(f func(int)) *SendStreamISetPriorityCall { 184 c.Call = c.Call.Do(f) 185 return c 186 } 187 188 // DoAndReturn rewrite *gomock.Call.DoAndReturn 189 func (c *SendStreamISetPriorityCall) DoAndReturn(f func(int)) *SendStreamISetPriorityCall { 190 c.Call = c.Call.DoAndReturn(f) 191 return c 192 } 193 194 // SetWriteDeadline mocks base method. 195 func (m *MockSendStreamI) SetWriteDeadline(arg0 time.Time) error { 196 m.ctrl.T.Helper() 197 ret := m.ctrl.Call(m, "SetWriteDeadline", arg0) 198 ret0, _ := ret[0].(error) 199 return ret0 200 } 201 202 // SetWriteDeadline indicates an expected call of SetWriteDeadline. 203 func (mr *MockSendStreamIMockRecorder) SetWriteDeadline(arg0 any) *SendStreamISetWriteDeadlineCall { 204 mr.mock.ctrl.T.Helper() 205 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockSendStreamI)(nil).SetWriteDeadline), arg0) 206 return &SendStreamISetWriteDeadlineCall{Call: call} 207 } 208 209 // SendStreamISetWriteDeadlineCall wrap *gomock.Call 210 type SendStreamISetWriteDeadlineCall struct { 211 *gomock.Call 212 } 213 214 // Return rewrite *gomock.Call.Return 215 func (c *SendStreamISetWriteDeadlineCall) Return(arg0 error) *SendStreamISetWriteDeadlineCall { 216 c.Call = c.Call.Return(arg0) 217 return c 218 } 219 220 // Do rewrite *gomock.Call.Do 221 func (c *SendStreamISetWriteDeadlineCall) Do(f func(time.Time) error) *SendStreamISetWriteDeadlineCall { 222 c.Call = c.Call.Do(f) 223 return c 224 } 225 226 // DoAndReturn rewrite *gomock.Call.DoAndReturn 227 func (c *SendStreamISetWriteDeadlineCall) DoAndReturn(f func(time.Time) error) *SendStreamISetWriteDeadlineCall { 228 c.Call = c.Call.DoAndReturn(f) 229 return c 230 } 231 232 // StreamID mocks base method. 233 func (m *MockSendStreamI) StreamID() protocol.StreamID { 234 m.ctrl.T.Helper() 235 ret := m.ctrl.Call(m, "StreamID") 236 ret0, _ := ret[0].(protocol.StreamID) 237 return ret0 238 } 239 240 // StreamID indicates an expected call of StreamID. 241 func (mr *MockSendStreamIMockRecorder) StreamID() *SendStreamIStreamIDCall { 242 mr.mock.ctrl.T.Helper() 243 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockSendStreamI)(nil).StreamID)) 244 return &SendStreamIStreamIDCall{Call: call} 245 } 246 247 // SendStreamIStreamIDCall wrap *gomock.Call 248 type SendStreamIStreamIDCall struct { 249 *gomock.Call 250 } 251 252 // Return rewrite *gomock.Call.Return 253 func (c *SendStreamIStreamIDCall) Return(arg0 protocol.StreamID) *SendStreamIStreamIDCall { 254 c.Call = c.Call.Return(arg0) 255 return c 256 } 257 258 // Do rewrite *gomock.Call.Do 259 func (c *SendStreamIStreamIDCall) Do(f func() protocol.StreamID) *SendStreamIStreamIDCall { 260 c.Call = c.Call.Do(f) 261 return c 262 } 263 264 // DoAndReturn rewrite *gomock.Call.DoAndReturn 265 func (c *SendStreamIStreamIDCall) DoAndReturn(f func() protocol.StreamID) *SendStreamIStreamIDCall { 266 c.Call = c.Call.DoAndReturn(f) 267 return c 268 } 269 270 // Write mocks base method. 271 func (m *MockSendStreamI) Write(arg0 []byte) (int, error) { 272 m.ctrl.T.Helper() 273 ret := m.ctrl.Call(m, "Write", arg0) 274 ret0, _ := ret[0].(int) 275 ret1, _ := ret[1].(error) 276 return ret0, ret1 277 } 278 279 // Write indicates an expected call of Write. 280 func (mr *MockSendStreamIMockRecorder) Write(arg0 any) *SendStreamIWriteCall { 281 mr.mock.ctrl.T.Helper() 282 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendStreamI)(nil).Write), arg0) 283 return &SendStreamIWriteCall{Call: call} 284 } 285 286 // SendStreamIWriteCall wrap *gomock.Call 287 type SendStreamIWriteCall struct { 288 *gomock.Call 289 } 290 291 // Return rewrite *gomock.Call.Return 292 func (c *SendStreamIWriteCall) Return(arg0 int, arg1 error) *SendStreamIWriteCall { 293 c.Call = c.Call.Return(arg0, arg1) 294 return c 295 } 296 297 // Do rewrite *gomock.Call.Do 298 func (c *SendStreamIWriteCall) Do(f func([]byte) (int, error)) *SendStreamIWriteCall { 299 c.Call = c.Call.Do(f) 300 return c 301 } 302 303 // DoAndReturn rewrite *gomock.Call.DoAndReturn 304 func (c *SendStreamIWriteCall) DoAndReturn(f func([]byte) (int, error)) *SendStreamIWriteCall { 305 c.Call = c.Call.DoAndReturn(f) 306 return c 307 } 308 309 // closeForShutdown mocks base method. 310 func (m *MockSendStreamI) closeForShutdown(arg0 error) { 311 m.ctrl.T.Helper() 312 m.ctrl.Call(m, "closeForShutdown", arg0) 313 } 314 315 // closeForShutdown indicates an expected call of closeForShutdown. 316 func (mr *MockSendStreamIMockRecorder) closeForShutdown(arg0 any) *SendStreamIcloseForShutdownCall { 317 mr.mock.ctrl.T.Helper() 318 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForShutdown", reflect.TypeOf((*MockSendStreamI)(nil).closeForShutdown), arg0) 319 return &SendStreamIcloseForShutdownCall{Call: call} 320 } 321 322 // SendStreamIcloseForShutdownCall wrap *gomock.Call 323 type SendStreamIcloseForShutdownCall struct { 324 *gomock.Call 325 } 326 327 // Return rewrite *gomock.Call.Return 328 func (c *SendStreamIcloseForShutdownCall) Return() *SendStreamIcloseForShutdownCall { 329 c.Call = c.Call.Return() 330 return c 331 } 332 333 // Do rewrite *gomock.Call.Do 334 func (c *SendStreamIcloseForShutdownCall) Do(f func(error)) *SendStreamIcloseForShutdownCall { 335 c.Call = c.Call.Do(f) 336 return c 337 } 338 339 // DoAndReturn rewrite *gomock.Call.DoAndReturn 340 func (c *SendStreamIcloseForShutdownCall) DoAndReturn(f func(error)) *SendStreamIcloseForShutdownCall { 341 c.Call = c.Call.DoAndReturn(f) 342 return c 343 } 344 345 // getPriority mocks base method. 346 func (m *MockSendStreamI) getPriority() int { 347 m.ctrl.T.Helper() 348 ret := m.ctrl.Call(m, "getPriority") 349 ret0, _ := ret[0].(int) 350 return ret0 351 } 352 353 // getPriority indicates an expected call of getPriority. 354 func (mr *MockSendStreamIMockRecorder) getPriority() *SendStreamIgetPriorityCall { 355 mr.mock.ctrl.T.Helper() 356 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPriority", reflect.TypeOf((*MockSendStreamI)(nil).getPriority)) 357 return &SendStreamIgetPriorityCall{Call: call} 358 } 359 360 // SendStreamIgetPriorityCall wrap *gomock.Call 361 type SendStreamIgetPriorityCall struct { 362 *gomock.Call 363 } 364 365 // Return rewrite *gomock.Call.Return 366 func (c *SendStreamIgetPriorityCall) Return(arg0 int) *SendStreamIgetPriorityCall { 367 c.Call = c.Call.Return(arg0) 368 return c 369 } 370 371 // Do rewrite *gomock.Call.Do 372 func (c *SendStreamIgetPriorityCall) Do(f func() int) *SendStreamIgetPriorityCall { 373 c.Call = c.Call.Do(f) 374 return c 375 } 376 377 // DoAndReturn rewrite *gomock.Call.DoAndReturn 378 func (c *SendStreamIgetPriorityCall) DoAndReturn(f func() int) *SendStreamIgetPriorityCall { 379 c.Call = c.Call.DoAndReturn(f) 380 return c 381 } 382 383 // handleStopSendingFrame mocks base method. 384 func (m *MockSendStreamI) handleStopSendingFrame(arg0 *wire.StopSendingFrame) { 385 m.ctrl.T.Helper() 386 m.ctrl.Call(m, "handleStopSendingFrame", arg0) 387 } 388 389 // handleStopSendingFrame indicates an expected call of handleStopSendingFrame. 390 func (mr *MockSendStreamIMockRecorder) handleStopSendingFrame(arg0 any) *SendStreamIhandleStopSendingFrameCall { 391 mr.mock.ctrl.T.Helper() 392 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStopSendingFrame", reflect.TypeOf((*MockSendStreamI)(nil).handleStopSendingFrame), arg0) 393 return &SendStreamIhandleStopSendingFrameCall{Call: call} 394 } 395 396 // SendStreamIhandleStopSendingFrameCall wrap *gomock.Call 397 type SendStreamIhandleStopSendingFrameCall struct { 398 *gomock.Call 399 } 400 401 // Return rewrite *gomock.Call.Return 402 func (c *SendStreamIhandleStopSendingFrameCall) Return() *SendStreamIhandleStopSendingFrameCall { 403 c.Call = c.Call.Return() 404 return c 405 } 406 407 // Do rewrite *gomock.Call.Do 408 func (c *SendStreamIhandleStopSendingFrameCall) Do(f func(*wire.StopSendingFrame)) *SendStreamIhandleStopSendingFrameCall { 409 c.Call = c.Call.Do(f) 410 return c 411 } 412 413 // DoAndReturn rewrite *gomock.Call.DoAndReturn 414 func (c *SendStreamIhandleStopSendingFrameCall) DoAndReturn(f func(*wire.StopSendingFrame)) *SendStreamIhandleStopSendingFrameCall { 415 c.Call = c.Call.DoAndReturn(f) 416 return c 417 } 418 419 // hasData mocks base method. 420 func (m *MockSendStreamI) hasData() bool { 421 m.ctrl.T.Helper() 422 ret := m.ctrl.Call(m, "hasData") 423 ret0, _ := ret[0].(bool) 424 return ret0 425 } 426 427 // hasData indicates an expected call of hasData. 428 func (mr *MockSendStreamIMockRecorder) hasData() *SendStreamIhasDataCall { 429 mr.mock.ctrl.T.Helper() 430 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "hasData", reflect.TypeOf((*MockSendStreamI)(nil).hasData)) 431 return &SendStreamIhasDataCall{Call: call} 432 } 433 434 // SendStreamIhasDataCall wrap *gomock.Call 435 type SendStreamIhasDataCall struct { 436 *gomock.Call 437 } 438 439 // Return rewrite *gomock.Call.Return 440 func (c *SendStreamIhasDataCall) Return(arg0 bool) *SendStreamIhasDataCall { 441 c.Call = c.Call.Return(arg0) 442 return c 443 } 444 445 // Do rewrite *gomock.Call.Do 446 func (c *SendStreamIhasDataCall) Do(f func() bool) *SendStreamIhasDataCall { 447 c.Call = c.Call.Do(f) 448 return c 449 } 450 451 // DoAndReturn rewrite *gomock.Call.DoAndReturn 452 func (c *SendStreamIhasDataCall) DoAndReturn(f func() bool) *SendStreamIhasDataCall { 453 c.Call = c.Call.DoAndReturn(f) 454 return c 455 } 456 457 // popStreamFrame mocks base method. 458 func (m *MockSendStreamI) popStreamFrame(arg0 protocol.ByteCount, arg1 protocol.Version) (ackhandler.StreamFrame, bool, bool) { 459 m.ctrl.T.Helper() 460 ret := m.ctrl.Call(m, "popStreamFrame", arg0, arg1) 461 ret0, _ := ret[0].(ackhandler.StreamFrame) 462 ret1, _ := ret[1].(bool) 463 ret2, _ := ret[2].(bool) 464 return ret0, ret1, ret2 465 } 466 467 // popStreamFrame indicates an expected call of popStreamFrame. 468 func (mr *MockSendStreamIMockRecorder) popStreamFrame(arg0, arg1 any) *SendStreamIpopStreamFrameCall { 469 mr.mock.ctrl.T.Helper() 470 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockSendStreamI)(nil).popStreamFrame), arg0, arg1) 471 return &SendStreamIpopStreamFrameCall{Call: call} 472 } 473 474 // SendStreamIpopStreamFrameCall wrap *gomock.Call 475 type SendStreamIpopStreamFrameCall struct { 476 *gomock.Call 477 } 478 479 // Return rewrite *gomock.Call.Return 480 func (c *SendStreamIpopStreamFrameCall) Return(arg0 ackhandler.StreamFrame, arg1, arg2 bool) *SendStreamIpopStreamFrameCall { 481 c.Call = c.Call.Return(arg0, arg1, arg2) 482 return c 483 } 484 485 // Do rewrite *gomock.Call.Do 486 func (c *SendStreamIpopStreamFrameCall) Do(f func(protocol.ByteCount, protocol.Version) (ackhandler.StreamFrame, bool, bool)) *SendStreamIpopStreamFrameCall { 487 c.Call = c.Call.Do(f) 488 return c 489 } 490 491 // DoAndReturn rewrite *gomock.Call.DoAndReturn 492 func (c *SendStreamIpopStreamFrameCall) DoAndReturn(f func(protocol.ByteCount, protocol.Version) (ackhandler.StreamFrame, bool, bool)) *SendStreamIpopStreamFrameCall { 493 c.Call = c.Call.DoAndReturn(f) 494 return c 495 } 496 497 // updateSendWindow mocks base method. 498 func (m *MockSendStreamI) updateSendWindow(arg0 protocol.ByteCount) { 499 m.ctrl.T.Helper() 500 m.ctrl.Call(m, "updateSendWindow", arg0) 501 } 502 503 // updateSendWindow indicates an expected call of updateSendWindow. 504 func (mr *MockSendStreamIMockRecorder) updateSendWindow(arg0 any) *SendStreamIupdateSendWindowCall { 505 mr.mock.ctrl.T.Helper() 506 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "updateSendWindow", reflect.TypeOf((*MockSendStreamI)(nil).updateSendWindow), arg0) 507 return &SendStreamIupdateSendWindowCall{Call: call} 508 } 509 510 // SendStreamIupdateSendWindowCall wrap *gomock.Call 511 type SendStreamIupdateSendWindowCall struct { 512 *gomock.Call 513 } 514 515 // Return rewrite *gomock.Call.Return 516 func (c *SendStreamIupdateSendWindowCall) Return() *SendStreamIupdateSendWindowCall { 517 c.Call = c.Call.Return() 518 return c 519 } 520 521 // Do rewrite *gomock.Call.Do 522 func (c *SendStreamIupdateSendWindowCall) Do(f func(protocol.ByteCount)) *SendStreamIupdateSendWindowCall { 523 c.Call = c.Call.Do(f) 524 return c 525 } 526 527 // DoAndReturn rewrite *gomock.Call.DoAndReturn 528 func (c *SendStreamIupdateSendWindowCall) DoAndReturn(f func(protocol.ByteCount)) *SendStreamIupdateSendWindowCall { 529 c.Call = c.Call.DoAndReturn(f) 530 return c 531 }