github.com/daeuniverse/quic-go@v0.0.0-20240413031024-943f218e0810/mock_receive_stream_internal_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/daeuniverse/quic-go (interfaces: ReceiveStreamI)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/daeuniverse/quic-go -destination mock_receive_stream_internal_test.go github.com/daeuniverse/quic-go ReceiveStreamI
     7  //
     8  
     9  // Package quic is a generated GoMock package.
    10  package quic
    11  
    12  import (
    13  	reflect "reflect"
    14  	time "time"
    15  
    16  	protocol "github.com/daeuniverse/quic-go/internal/protocol"
    17  	qerr "github.com/daeuniverse/quic-go/internal/qerr"
    18  	wire "github.com/daeuniverse/quic-go/internal/wire"
    19  	gomock "go.uber.org/mock/gomock"
    20  )
    21  
    22  // MockReceiveStreamI is a mock of ReceiveStreamI interface.
    23  type MockReceiveStreamI struct {
    24  	ctrl     *gomock.Controller
    25  	recorder *MockReceiveStreamIMockRecorder
    26  }
    27  
    28  // MockReceiveStreamIMockRecorder is the mock recorder for MockReceiveStreamI.
    29  type MockReceiveStreamIMockRecorder struct {
    30  	mock *MockReceiveStreamI
    31  }
    32  
    33  // NewMockReceiveStreamI creates a new mock instance.
    34  func NewMockReceiveStreamI(ctrl *gomock.Controller) *MockReceiveStreamI {
    35  	mock := &MockReceiveStreamI{ctrl: ctrl}
    36  	mock.recorder = &MockReceiveStreamIMockRecorder{mock}
    37  	return mock
    38  }
    39  
    40  // EXPECT returns an object that allows the caller to indicate expected use.
    41  func (m *MockReceiveStreamI) EXPECT() *MockReceiveStreamIMockRecorder {
    42  	return m.recorder
    43  }
    44  
    45  // CancelRead mocks base method.
    46  func (m *MockReceiveStreamI) CancelRead(arg0 qerr.StreamErrorCode) {
    47  	m.ctrl.T.Helper()
    48  	m.ctrl.Call(m, "CancelRead", arg0)
    49  }
    50  
    51  // CancelRead indicates an expected call of CancelRead.
    52  func (mr *MockReceiveStreamIMockRecorder) CancelRead(arg0 any) *MockReceiveStreamICancelReadCall {
    53  	mr.mock.ctrl.T.Helper()
    54  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRead", reflect.TypeOf((*MockReceiveStreamI)(nil).CancelRead), arg0)
    55  	return &MockReceiveStreamICancelReadCall{Call: call}
    56  }
    57  
    58  // MockReceiveStreamICancelReadCall wrap *gomock.Call
    59  type MockReceiveStreamICancelReadCall struct {
    60  	*gomock.Call
    61  }
    62  
    63  // Return rewrite *gomock.Call.Return
    64  func (c *MockReceiveStreamICancelReadCall) Return() *MockReceiveStreamICancelReadCall {
    65  	c.Call = c.Call.Return()
    66  	return c
    67  }
    68  
    69  // Do rewrite *gomock.Call.Do
    70  func (c *MockReceiveStreamICancelReadCall) Do(f func(qerr.StreamErrorCode)) *MockReceiveStreamICancelReadCall {
    71  	c.Call = c.Call.Do(f)
    72  	return c
    73  }
    74  
    75  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    76  func (c *MockReceiveStreamICancelReadCall) DoAndReturn(f func(qerr.StreamErrorCode)) *MockReceiveStreamICancelReadCall {
    77  	c.Call = c.Call.DoAndReturn(f)
    78  	return c
    79  }
    80  
    81  // Read mocks base method.
    82  func (m *MockReceiveStreamI) Read(arg0 []byte) (int, error) {
    83  	m.ctrl.T.Helper()
    84  	ret := m.ctrl.Call(m, "Read", arg0)
    85  	ret0, _ := ret[0].(int)
    86  	ret1, _ := ret[1].(error)
    87  	return ret0, ret1
    88  }
    89  
    90  // Read indicates an expected call of Read.
    91  func (mr *MockReceiveStreamIMockRecorder) Read(arg0 any) *MockReceiveStreamIReadCall {
    92  	mr.mock.ctrl.T.Helper()
    93  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockReceiveStreamI)(nil).Read), arg0)
    94  	return &MockReceiveStreamIReadCall{Call: call}
    95  }
    96  
    97  // MockReceiveStreamIReadCall wrap *gomock.Call
    98  type MockReceiveStreamIReadCall struct {
    99  	*gomock.Call
   100  }
   101  
   102  // Return rewrite *gomock.Call.Return
   103  func (c *MockReceiveStreamIReadCall) Return(arg0 int, arg1 error) *MockReceiveStreamIReadCall {
   104  	c.Call = c.Call.Return(arg0, arg1)
   105  	return c
   106  }
   107  
   108  // Do rewrite *gomock.Call.Do
   109  func (c *MockReceiveStreamIReadCall) Do(f func([]byte) (int, error)) *MockReceiveStreamIReadCall {
   110  	c.Call = c.Call.Do(f)
   111  	return c
   112  }
   113  
   114  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   115  func (c *MockReceiveStreamIReadCall) DoAndReturn(f func([]byte) (int, error)) *MockReceiveStreamIReadCall {
   116  	c.Call = c.Call.DoAndReturn(f)
   117  	return c
   118  }
   119  
   120  // SetReadDeadline mocks base method.
   121  func (m *MockReceiveStreamI) SetReadDeadline(arg0 time.Time) error {
   122  	m.ctrl.T.Helper()
   123  	ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
   124  	ret0, _ := ret[0].(error)
   125  	return ret0
   126  }
   127  
   128  // SetReadDeadline indicates an expected call of SetReadDeadline.
   129  func (mr *MockReceiveStreamIMockRecorder) SetReadDeadline(arg0 any) *MockReceiveStreamISetReadDeadlineCall {
   130  	mr.mock.ctrl.T.Helper()
   131  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockReceiveStreamI)(nil).SetReadDeadline), arg0)
   132  	return &MockReceiveStreamISetReadDeadlineCall{Call: call}
   133  }
   134  
   135  // MockReceiveStreamISetReadDeadlineCall wrap *gomock.Call
   136  type MockReceiveStreamISetReadDeadlineCall struct {
   137  	*gomock.Call
   138  }
   139  
   140  // Return rewrite *gomock.Call.Return
   141  func (c *MockReceiveStreamISetReadDeadlineCall) Return(arg0 error) *MockReceiveStreamISetReadDeadlineCall {
   142  	c.Call = c.Call.Return(arg0)
   143  	return c
   144  }
   145  
   146  // Do rewrite *gomock.Call.Do
   147  func (c *MockReceiveStreamISetReadDeadlineCall) Do(f func(time.Time) error) *MockReceiveStreamISetReadDeadlineCall {
   148  	c.Call = c.Call.Do(f)
   149  	return c
   150  }
   151  
   152  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   153  func (c *MockReceiveStreamISetReadDeadlineCall) DoAndReturn(f func(time.Time) error) *MockReceiveStreamISetReadDeadlineCall {
   154  	c.Call = c.Call.DoAndReturn(f)
   155  	return c
   156  }
   157  
   158  // StreamID mocks base method.
   159  func (m *MockReceiveStreamI) StreamID() protocol.StreamID {
   160  	m.ctrl.T.Helper()
   161  	ret := m.ctrl.Call(m, "StreamID")
   162  	ret0, _ := ret[0].(protocol.StreamID)
   163  	return ret0
   164  }
   165  
   166  // StreamID indicates an expected call of StreamID.
   167  func (mr *MockReceiveStreamIMockRecorder) StreamID() *MockReceiveStreamIStreamIDCall {
   168  	mr.mock.ctrl.T.Helper()
   169  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockReceiveStreamI)(nil).StreamID))
   170  	return &MockReceiveStreamIStreamIDCall{Call: call}
   171  }
   172  
   173  // MockReceiveStreamIStreamIDCall wrap *gomock.Call
   174  type MockReceiveStreamIStreamIDCall struct {
   175  	*gomock.Call
   176  }
   177  
   178  // Return rewrite *gomock.Call.Return
   179  func (c *MockReceiveStreamIStreamIDCall) Return(arg0 protocol.StreamID) *MockReceiveStreamIStreamIDCall {
   180  	c.Call = c.Call.Return(arg0)
   181  	return c
   182  }
   183  
   184  // Do rewrite *gomock.Call.Do
   185  func (c *MockReceiveStreamIStreamIDCall) Do(f func() protocol.StreamID) *MockReceiveStreamIStreamIDCall {
   186  	c.Call = c.Call.Do(f)
   187  	return c
   188  }
   189  
   190  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   191  func (c *MockReceiveStreamIStreamIDCall) DoAndReturn(f func() protocol.StreamID) *MockReceiveStreamIStreamIDCall {
   192  	c.Call = c.Call.DoAndReturn(f)
   193  	return c
   194  }
   195  
   196  // closeForShutdown mocks base method.
   197  func (m *MockReceiveStreamI) closeForShutdown(arg0 error) {
   198  	m.ctrl.T.Helper()
   199  	m.ctrl.Call(m, "closeForShutdown", arg0)
   200  }
   201  
   202  // closeForShutdown indicates an expected call of closeForShutdown.
   203  func (mr *MockReceiveStreamIMockRecorder) closeForShutdown(arg0 any) *MockReceiveStreamIcloseForShutdownCall {
   204  	mr.mock.ctrl.T.Helper()
   205  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForShutdown", reflect.TypeOf((*MockReceiveStreamI)(nil).closeForShutdown), arg0)
   206  	return &MockReceiveStreamIcloseForShutdownCall{Call: call}
   207  }
   208  
   209  // MockReceiveStreamIcloseForShutdownCall wrap *gomock.Call
   210  type MockReceiveStreamIcloseForShutdownCall struct {
   211  	*gomock.Call
   212  }
   213  
   214  // Return rewrite *gomock.Call.Return
   215  func (c *MockReceiveStreamIcloseForShutdownCall) Return() *MockReceiveStreamIcloseForShutdownCall {
   216  	c.Call = c.Call.Return()
   217  	return c
   218  }
   219  
   220  // Do rewrite *gomock.Call.Do
   221  func (c *MockReceiveStreamIcloseForShutdownCall) Do(f func(error)) *MockReceiveStreamIcloseForShutdownCall {
   222  	c.Call = c.Call.Do(f)
   223  	return c
   224  }
   225  
   226  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   227  func (c *MockReceiveStreamIcloseForShutdownCall) DoAndReturn(f func(error)) *MockReceiveStreamIcloseForShutdownCall {
   228  	c.Call = c.Call.DoAndReturn(f)
   229  	return c
   230  }
   231  
   232  // getWindowUpdate mocks base method.
   233  func (m *MockReceiveStreamI) getWindowUpdate() protocol.ByteCount {
   234  	m.ctrl.T.Helper()
   235  	ret := m.ctrl.Call(m, "getWindowUpdate")
   236  	ret0, _ := ret[0].(protocol.ByteCount)
   237  	return ret0
   238  }
   239  
   240  // getWindowUpdate indicates an expected call of getWindowUpdate.
   241  func (mr *MockReceiveStreamIMockRecorder) getWindowUpdate() *MockReceiveStreamIgetWindowUpdateCall {
   242  	mr.mock.ctrl.T.Helper()
   243  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getWindowUpdate", reflect.TypeOf((*MockReceiveStreamI)(nil).getWindowUpdate))
   244  	return &MockReceiveStreamIgetWindowUpdateCall{Call: call}
   245  }
   246  
   247  // MockReceiveStreamIgetWindowUpdateCall wrap *gomock.Call
   248  type MockReceiveStreamIgetWindowUpdateCall struct {
   249  	*gomock.Call
   250  }
   251  
   252  // Return rewrite *gomock.Call.Return
   253  func (c *MockReceiveStreamIgetWindowUpdateCall) Return(arg0 protocol.ByteCount) *MockReceiveStreamIgetWindowUpdateCall {
   254  	c.Call = c.Call.Return(arg0)
   255  	return c
   256  }
   257  
   258  // Do rewrite *gomock.Call.Do
   259  func (c *MockReceiveStreamIgetWindowUpdateCall) Do(f func() protocol.ByteCount) *MockReceiveStreamIgetWindowUpdateCall {
   260  	c.Call = c.Call.Do(f)
   261  	return c
   262  }
   263  
   264  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   265  func (c *MockReceiveStreamIgetWindowUpdateCall) DoAndReturn(f func() protocol.ByteCount) *MockReceiveStreamIgetWindowUpdateCall {
   266  	c.Call = c.Call.DoAndReturn(f)
   267  	return c
   268  }
   269  
   270  // handleResetStreamFrame mocks base method.
   271  func (m *MockReceiveStreamI) handleResetStreamFrame(arg0 *wire.ResetStreamFrame) error {
   272  	m.ctrl.T.Helper()
   273  	ret := m.ctrl.Call(m, "handleResetStreamFrame", arg0)
   274  	ret0, _ := ret[0].(error)
   275  	return ret0
   276  }
   277  
   278  // handleResetStreamFrame indicates an expected call of handleResetStreamFrame.
   279  func (mr *MockReceiveStreamIMockRecorder) handleResetStreamFrame(arg0 any) *MockReceiveStreamIhandleResetStreamFrameCall {
   280  	mr.mock.ctrl.T.Helper()
   281  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleResetStreamFrame", reflect.TypeOf((*MockReceiveStreamI)(nil).handleResetStreamFrame), arg0)
   282  	return &MockReceiveStreamIhandleResetStreamFrameCall{Call: call}
   283  }
   284  
   285  // MockReceiveStreamIhandleResetStreamFrameCall wrap *gomock.Call
   286  type MockReceiveStreamIhandleResetStreamFrameCall struct {
   287  	*gomock.Call
   288  }
   289  
   290  // Return rewrite *gomock.Call.Return
   291  func (c *MockReceiveStreamIhandleResetStreamFrameCall) Return(arg0 error) *MockReceiveStreamIhandleResetStreamFrameCall {
   292  	c.Call = c.Call.Return(arg0)
   293  	return c
   294  }
   295  
   296  // Do rewrite *gomock.Call.Do
   297  func (c *MockReceiveStreamIhandleResetStreamFrameCall) Do(f func(*wire.ResetStreamFrame) error) *MockReceiveStreamIhandleResetStreamFrameCall {
   298  	c.Call = c.Call.Do(f)
   299  	return c
   300  }
   301  
   302  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   303  func (c *MockReceiveStreamIhandleResetStreamFrameCall) DoAndReturn(f func(*wire.ResetStreamFrame) error) *MockReceiveStreamIhandleResetStreamFrameCall {
   304  	c.Call = c.Call.DoAndReturn(f)
   305  	return c
   306  }
   307  
   308  // handleStreamFrame mocks base method.
   309  func (m *MockReceiveStreamI) handleStreamFrame(arg0 *wire.StreamFrame) error {
   310  	m.ctrl.T.Helper()
   311  	ret := m.ctrl.Call(m, "handleStreamFrame", arg0)
   312  	ret0, _ := ret[0].(error)
   313  	return ret0
   314  }
   315  
   316  // handleStreamFrame indicates an expected call of handleStreamFrame.
   317  func (mr *MockReceiveStreamIMockRecorder) handleStreamFrame(arg0 any) *MockReceiveStreamIhandleStreamFrameCall {
   318  	mr.mock.ctrl.T.Helper()
   319  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStreamFrame", reflect.TypeOf((*MockReceiveStreamI)(nil).handleStreamFrame), arg0)
   320  	return &MockReceiveStreamIhandleStreamFrameCall{Call: call}
   321  }
   322  
   323  // MockReceiveStreamIhandleStreamFrameCall wrap *gomock.Call
   324  type MockReceiveStreamIhandleStreamFrameCall struct {
   325  	*gomock.Call
   326  }
   327  
   328  // Return rewrite *gomock.Call.Return
   329  func (c *MockReceiveStreamIhandleStreamFrameCall) Return(arg0 error) *MockReceiveStreamIhandleStreamFrameCall {
   330  	c.Call = c.Call.Return(arg0)
   331  	return c
   332  }
   333  
   334  // Do rewrite *gomock.Call.Do
   335  func (c *MockReceiveStreamIhandleStreamFrameCall) Do(f func(*wire.StreamFrame) error) *MockReceiveStreamIhandleStreamFrameCall {
   336  	c.Call = c.Call.Do(f)
   337  	return c
   338  }
   339  
   340  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   341  func (c *MockReceiveStreamIhandleStreamFrameCall) DoAndReturn(f func(*wire.StreamFrame) error) *MockReceiveStreamIhandleStreamFrameCall {
   342  	c.Call = c.Call.DoAndReturn(f)
   343  	return c
   344  }