github.com/quic-go/quic-go@v0.44.0/mock_send_stream_internal_test.go (about)

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