github.com/danielpfeifer02/quic-go-prio-packs@v0.41.0-28/mock_send_stream_internal_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/danielpfeifer02/quic-go-prio-packs (interfaces: SendStreamI)
     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_send_stream_internal_test.go github.com/danielpfeifer02/quic-go-prio-packs 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/danielpfeifer02/quic-go-prio-packs/internal/ackhandler"
    17  	protocol "github.com/danielpfeifer02/quic-go-prio-packs/internal/protocol"
    18  	qerr "github.com/danielpfeifer02/quic-go-prio-packs/internal/qerr"
    19  	wire "github.com/danielpfeifer02/quic-go-prio-packs/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  // SetWriteDeadline mocks base method.
   159  func (m *MockSendStreamI) SetWriteDeadline(arg0 time.Time) error {
   160  	m.ctrl.T.Helper()
   161  	ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
   162  	ret0, _ := ret[0].(error)
   163  	return ret0
   164  }
   165  
   166  // SetWriteDeadline indicates an expected call of SetWriteDeadline.
   167  func (mr *MockSendStreamIMockRecorder) SetWriteDeadline(arg0 any) *SendStreamISetWriteDeadlineCall {
   168  	mr.mock.ctrl.T.Helper()
   169  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockSendStreamI)(nil).SetWriteDeadline), arg0)
   170  	return &SendStreamISetWriteDeadlineCall{Call: call}
   171  }
   172  
   173  // SendStreamISetWriteDeadlineCall wrap *gomock.Call
   174  type SendStreamISetWriteDeadlineCall struct {
   175  	*gomock.Call
   176  }
   177  
   178  // Return rewrite *gomock.Call.Return
   179  func (c *SendStreamISetWriteDeadlineCall) Return(arg0 error) *SendStreamISetWriteDeadlineCall {
   180  	c.Call = c.Call.Return(arg0)
   181  	return c
   182  }
   183  
   184  // Do rewrite *gomock.Call.Do
   185  func (c *SendStreamISetWriteDeadlineCall) Do(f func(time.Time) error) *SendStreamISetWriteDeadlineCall {
   186  	c.Call = c.Call.Do(f)
   187  	return c
   188  }
   189  
   190  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   191  func (c *SendStreamISetWriteDeadlineCall) DoAndReturn(f func(time.Time) error) *SendStreamISetWriteDeadlineCall {
   192  	c.Call = c.Call.DoAndReturn(f)
   193  	return c
   194  }
   195  
   196  // StreamID mocks base method.
   197  func (m *MockSendStreamI) StreamID() protocol.StreamID {
   198  	m.ctrl.T.Helper()
   199  	ret := m.ctrl.Call(m, "StreamID")
   200  	ret0, _ := ret[0].(protocol.StreamID)
   201  	return ret0
   202  }
   203  
   204  // StreamID indicates an expected call of StreamID.
   205  func (mr *MockSendStreamIMockRecorder) StreamID() *SendStreamIStreamIDCall {
   206  	mr.mock.ctrl.T.Helper()
   207  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockSendStreamI)(nil).StreamID))
   208  	return &SendStreamIStreamIDCall{Call: call}
   209  }
   210  
   211  // SendStreamIStreamIDCall wrap *gomock.Call
   212  type SendStreamIStreamIDCall struct {
   213  	*gomock.Call
   214  }
   215  
   216  // Return rewrite *gomock.Call.Return
   217  func (c *SendStreamIStreamIDCall) Return(arg0 protocol.StreamID) *SendStreamIStreamIDCall {
   218  	c.Call = c.Call.Return(arg0)
   219  	return c
   220  }
   221  
   222  // Do rewrite *gomock.Call.Do
   223  func (c *SendStreamIStreamIDCall) Do(f func() protocol.StreamID) *SendStreamIStreamIDCall {
   224  	c.Call = c.Call.Do(f)
   225  	return c
   226  }
   227  
   228  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   229  func (c *SendStreamIStreamIDCall) DoAndReturn(f func() protocol.StreamID) *SendStreamIStreamIDCall {
   230  	c.Call = c.Call.DoAndReturn(f)
   231  	return c
   232  }
   233  
   234  // Write mocks base method.
   235  func (m *MockSendStreamI) Write(arg0 []byte) (int, error) {
   236  	m.ctrl.T.Helper()
   237  	ret := m.ctrl.Call(m, "Write", arg0)
   238  	ret0, _ := ret[0].(int)
   239  	ret1, _ := ret[1].(error)
   240  	return ret0, ret1
   241  }
   242  
   243  // Write indicates an expected call of Write.
   244  func (mr *MockSendStreamIMockRecorder) Write(arg0 any) *SendStreamIWriteCall {
   245  	mr.mock.ctrl.T.Helper()
   246  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendStreamI)(nil).Write), arg0)
   247  	return &SendStreamIWriteCall{Call: call}
   248  }
   249  
   250  // SendStreamIWriteCall wrap *gomock.Call
   251  type SendStreamIWriteCall struct {
   252  	*gomock.Call
   253  }
   254  
   255  // Return rewrite *gomock.Call.Return
   256  func (c *SendStreamIWriteCall) Return(arg0 int, arg1 error) *SendStreamIWriteCall {
   257  	c.Call = c.Call.Return(arg0, arg1)
   258  	return c
   259  }
   260  
   261  // Do rewrite *gomock.Call.Do
   262  func (c *SendStreamIWriteCall) Do(f func([]byte) (int, error)) *SendStreamIWriteCall {
   263  	c.Call = c.Call.Do(f)
   264  	return c
   265  }
   266  
   267  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   268  func (c *SendStreamIWriteCall) DoAndReturn(f func([]byte) (int, error)) *SendStreamIWriteCall {
   269  	c.Call = c.Call.DoAndReturn(f)
   270  	return c
   271  }
   272  
   273  // closeForShutdown mocks base method.
   274  func (m *MockSendStreamI) closeForShutdown(arg0 error) {
   275  	m.ctrl.T.Helper()
   276  	m.ctrl.Call(m, "closeForShutdown", arg0)
   277  }
   278  
   279  // closeForShutdown indicates an expected call of closeForShutdown.
   280  func (mr *MockSendStreamIMockRecorder) closeForShutdown(arg0 any) *SendStreamIcloseForShutdownCall {
   281  	mr.mock.ctrl.T.Helper()
   282  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForShutdown", reflect.TypeOf((*MockSendStreamI)(nil).closeForShutdown), arg0)
   283  	return &SendStreamIcloseForShutdownCall{Call: call}
   284  }
   285  
   286  // SendStreamIcloseForShutdownCall wrap *gomock.Call
   287  type SendStreamIcloseForShutdownCall struct {
   288  	*gomock.Call
   289  }
   290  
   291  // Return rewrite *gomock.Call.Return
   292  func (c *SendStreamIcloseForShutdownCall) Return() *SendStreamIcloseForShutdownCall {
   293  	c.Call = c.Call.Return()
   294  	return c
   295  }
   296  
   297  // Do rewrite *gomock.Call.Do
   298  func (c *SendStreamIcloseForShutdownCall) Do(f func(error)) *SendStreamIcloseForShutdownCall {
   299  	c.Call = c.Call.Do(f)
   300  	return c
   301  }
   302  
   303  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   304  func (c *SendStreamIcloseForShutdownCall) DoAndReturn(f func(error)) *SendStreamIcloseForShutdownCall {
   305  	c.Call = c.Call.DoAndReturn(f)
   306  	return c
   307  }
   308  
   309  // handleStopSendingFrame mocks base method.
   310  func (m *MockSendStreamI) handleStopSendingFrame(arg0 *wire.StopSendingFrame) {
   311  	m.ctrl.T.Helper()
   312  	m.ctrl.Call(m, "handleStopSendingFrame", arg0)
   313  }
   314  
   315  // handleStopSendingFrame indicates an expected call of handleStopSendingFrame.
   316  func (mr *MockSendStreamIMockRecorder) handleStopSendingFrame(arg0 any) *SendStreamIhandleStopSendingFrameCall {
   317  	mr.mock.ctrl.T.Helper()
   318  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStopSendingFrame", reflect.TypeOf((*MockSendStreamI)(nil).handleStopSendingFrame), arg0)
   319  	return &SendStreamIhandleStopSendingFrameCall{Call: call}
   320  }
   321  
   322  // SendStreamIhandleStopSendingFrameCall wrap *gomock.Call
   323  type SendStreamIhandleStopSendingFrameCall struct {
   324  	*gomock.Call
   325  }
   326  
   327  // Return rewrite *gomock.Call.Return
   328  func (c *SendStreamIhandleStopSendingFrameCall) Return() *SendStreamIhandleStopSendingFrameCall {
   329  	c.Call = c.Call.Return()
   330  	return c
   331  }
   332  
   333  // Do rewrite *gomock.Call.Do
   334  func (c *SendStreamIhandleStopSendingFrameCall) Do(f func(*wire.StopSendingFrame)) *SendStreamIhandleStopSendingFrameCall {
   335  	c.Call = c.Call.Do(f)
   336  	return c
   337  }
   338  
   339  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   340  func (c *SendStreamIhandleStopSendingFrameCall) DoAndReturn(f func(*wire.StopSendingFrame)) *SendStreamIhandleStopSendingFrameCall {
   341  	c.Call = c.Call.DoAndReturn(f)
   342  	return c
   343  }
   344  
   345  // hasData mocks base method.
   346  func (m *MockSendStreamI) hasData() bool {
   347  	m.ctrl.T.Helper()
   348  	ret := m.ctrl.Call(m, "hasData")
   349  	ret0, _ := ret[0].(bool)
   350  	return ret0
   351  }
   352  
   353  // hasData indicates an expected call of hasData.
   354  func (mr *MockSendStreamIMockRecorder) hasData() *SendStreamIhasDataCall {
   355  	mr.mock.ctrl.T.Helper()
   356  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "hasData", reflect.TypeOf((*MockSendStreamI)(nil).hasData))
   357  	return &SendStreamIhasDataCall{Call: call}
   358  }
   359  
   360  // SendStreamIhasDataCall wrap *gomock.Call
   361  type SendStreamIhasDataCall struct {
   362  	*gomock.Call
   363  }
   364  
   365  // Return rewrite *gomock.Call.Return
   366  func (c *SendStreamIhasDataCall) Return(arg0 bool) *SendStreamIhasDataCall {
   367  	c.Call = c.Call.Return(arg0)
   368  	return c
   369  }
   370  
   371  // Do rewrite *gomock.Call.Do
   372  func (c *SendStreamIhasDataCall) Do(f func() bool) *SendStreamIhasDataCall {
   373  	c.Call = c.Call.Do(f)
   374  	return c
   375  }
   376  
   377  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   378  func (c *SendStreamIhasDataCall) DoAndReturn(f func() bool) *SendStreamIhasDataCall {
   379  	c.Call = c.Call.DoAndReturn(f)
   380  	return c
   381  }
   382  
   383  // popStreamFrame mocks base method.
   384  func (m *MockSendStreamI) popStreamFrame(arg0 protocol.ByteCount, arg1 protocol.Version) (ackhandler.StreamFrame, bool, bool) {
   385  	m.ctrl.T.Helper()
   386  	ret := m.ctrl.Call(m, "popStreamFrame", arg0, arg1)
   387  	ret0, _ := ret[0].(ackhandler.StreamFrame)
   388  	ret1, _ := ret[1].(bool)
   389  	ret2, _ := ret[2].(bool)
   390  	return ret0, ret1, ret2
   391  }
   392  
   393  // popStreamFrame indicates an expected call of popStreamFrame.
   394  func (mr *MockSendStreamIMockRecorder) popStreamFrame(arg0, arg1 any) *SendStreamIpopStreamFrameCall {
   395  	mr.mock.ctrl.T.Helper()
   396  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockSendStreamI)(nil).popStreamFrame), arg0, arg1)
   397  	return &SendStreamIpopStreamFrameCall{Call: call}
   398  }
   399  
   400  // SendStreamIpopStreamFrameCall wrap *gomock.Call
   401  type SendStreamIpopStreamFrameCall struct {
   402  	*gomock.Call
   403  }
   404  
   405  // Return rewrite *gomock.Call.Return
   406  func (c *SendStreamIpopStreamFrameCall) Return(arg0 ackhandler.StreamFrame, arg1, arg2 bool) *SendStreamIpopStreamFrameCall {
   407  	c.Call = c.Call.Return(arg0, arg1, arg2)
   408  	return c
   409  }
   410  
   411  // Do rewrite *gomock.Call.Do
   412  func (c *SendStreamIpopStreamFrameCall) Do(f func(protocol.ByteCount, protocol.Version) (ackhandler.StreamFrame, bool, bool)) *SendStreamIpopStreamFrameCall {
   413  	c.Call = c.Call.Do(f)
   414  	return c
   415  }
   416  
   417  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   418  func (c *SendStreamIpopStreamFrameCall) DoAndReturn(f func(protocol.ByteCount, protocol.Version) (ackhandler.StreamFrame, bool, bool)) *SendStreamIpopStreamFrameCall {
   419  	c.Call = c.Call.DoAndReturn(f)
   420  	return c
   421  }
   422  
   423  // updateSendWindow mocks base method.
   424  func (m *MockSendStreamI) updateSendWindow(arg0 protocol.ByteCount) {
   425  	m.ctrl.T.Helper()
   426  	m.ctrl.Call(m, "updateSendWindow", arg0)
   427  }
   428  
   429  // updateSendWindow indicates an expected call of updateSendWindow.
   430  func (mr *MockSendStreamIMockRecorder) updateSendWindow(arg0 any) *SendStreamIupdateSendWindowCall {
   431  	mr.mock.ctrl.T.Helper()
   432  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "updateSendWindow", reflect.TypeOf((*MockSendStreamI)(nil).updateSendWindow), arg0)
   433  	return &SendStreamIupdateSendWindowCall{Call: call}
   434  }
   435  
   436  // SendStreamIupdateSendWindowCall wrap *gomock.Call
   437  type SendStreamIupdateSendWindowCall struct {
   438  	*gomock.Call
   439  }
   440  
   441  // Return rewrite *gomock.Call.Return
   442  func (c *SendStreamIupdateSendWindowCall) Return() *SendStreamIupdateSendWindowCall {
   443  	c.Call = c.Call.Return()
   444  	return c
   445  }
   446  
   447  // Do rewrite *gomock.Call.Do
   448  func (c *SendStreamIupdateSendWindowCall) Do(f func(protocol.ByteCount)) *SendStreamIupdateSendWindowCall {
   449  	c.Call = c.Call.Do(f)
   450  	return c
   451  }
   452  
   453  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   454  func (c *SendStreamIupdateSendWindowCall) DoAndReturn(f func(protocol.ByteCount)) *SendStreamIupdateSendWindowCall {
   455  	c.Call = c.Call.DoAndReturn(f)
   456  	return c
   457  }