github.com/MerlinKodo/quic-go@v0.39.2/internal/mocks/quic/stream.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/MerlinKodo/quic-go (interfaces: Stream)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -build_flags=-tags=gomock -package mockquic -destination quic/stream.go github.com/MerlinKodo/quic-go Stream
     7  //
     8  // Package mockquic is a generated GoMock package.
     9  package mockquic
    10  
    11  import (
    12  	context "context"
    13  	reflect "reflect"
    14  	time "time"
    15  
    16  	protocol "github.com/MerlinKodo/quic-go/internal/protocol"
    17  	qerr "github.com/MerlinKodo/quic-go/internal/qerr"
    18  	gomock "go.uber.org/mock/gomock"
    19  )
    20  
    21  // MockStream is a mock of Stream interface.
    22  type MockStream struct {
    23  	ctrl     *gomock.Controller
    24  	recorder *MockStreamMockRecorder
    25  }
    26  
    27  // MockStreamMockRecorder is the mock recorder for MockStream.
    28  type MockStreamMockRecorder struct {
    29  	mock *MockStream
    30  }
    31  
    32  // NewMockStream creates a new mock instance.
    33  func NewMockStream(ctrl *gomock.Controller) *MockStream {
    34  	mock := &MockStream{ctrl: ctrl}
    35  	mock.recorder = &MockStreamMockRecorder{mock}
    36  	return mock
    37  }
    38  
    39  // EXPECT returns an object that allows the caller to indicate expected use.
    40  func (m *MockStream) EXPECT() *MockStreamMockRecorder {
    41  	return m.recorder
    42  }
    43  
    44  // CancelRead mocks base method.
    45  func (m *MockStream) CancelRead(arg0 qerr.StreamErrorCode) {
    46  	m.ctrl.T.Helper()
    47  	m.ctrl.Call(m, "CancelRead", arg0)
    48  }
    49  
    50  // CancelRead indicates an expected call of CancelRead.
    51  func (mr *MockStreamMockRecorder) CancelRead(arg0 any) *gomock.Call {
    52  	mr.mock.ctrl.T.Helper()
    53  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRead", reflect.TypeOf((*MockStream)(nil).CancelRead), arg0)
    54  }
    55  
    56  // CancelWrite mocks base method.
    57  func (m *MockStream) CancelWrite(arg0 qerr.StreamErrorCode) {
    58  	m.ctrl.T.Helper()
    59  	m.ctrl.Call(m, "CancelWrite", arg0)
    60  }
    61  
    62  // CancelWrite indicates an expected call of CancelWrite.
    63  func (mr *MockStreamMockRecorder) CancelWrite(arg0 any) *gomock.Call {
    64  	mr.mock.ctrl.T.Helper()
    65  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWrite", reflect.TypeOf((*MockStream)(nil).CancelWrite), arg0)
    66  }
    67  
    68  // Close mocks base method.
    69  func (m *MockStream) Close() error {
    70  	m.ctrl.T.Helper()
    71  	ret := m.ctrl.Call(m, "Close")
    72  	ret0, _ := ret[0].(error)
    73  	return ret0
    74  }
    75  
    76  // Close indicates an expected call of Close.
    77  func (mr *MockStreamMockRecorder) Close() *gomock.Call {
    78  	mr.mock.ctrl.T.Helper()
    79  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStream)(nil).Close))
    80  }
    81  
    82  // Context mocks base method.
    83  func (m *MockStream) Context() context.Context {
    84  	m.ctrl.T.Helper()
    85  	ret := m.ctrl.Call(m, "Context")
    86  	ret0, _ := ret[0].(context.Context)
    87  	return ret0
    88  }
    89  
    90  // Context indicates an expected call of Context.
    91  func (mr *MockStreamMockRecorder) Context() *gomock.Call {
    92  	mr.mock.ctrl.T.Helper()
    93  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockStream)(nil).Context))
    94  }
    95  
    96  // Read mocks base method.
    97  func (m *MockStream) Read(arg0 []byte) (int, error) {
    98  	m.ctrl.T.Helper()
    99  	ret := m.ctrl.Call(m, "Read", arg0)
   100  	ret0, _ := ret[0].(int)
   101  	ret1, _ := ret[1].(error)
   102  	return ret0, ret1
   103  }
   104  
   105  // Read indicates an expected call of Read.
   106  func (mr *MockStreamMockRecorder) Read(arg0 any) *gomock.Call {
   107  	mr.mock.ctrl.T.Helper()
   108  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStream)(nil).Read), arg0)
   109  }
   110  
   111  // SetDeadline mocks base method.
   112  func (m *MockStream) SetDeadline(arg0 time.Time) error {
   113  	m.ctrl.T.Helper()
   114  	ret := m.ctrl.Call(m, "SetDeadline", arg0)
   115  	ret0, _ := ret[0].(error)
   116  	return ret0
   117  }
   118  
   119  // SetDeadline indicates an expected call of SetDeadline.
   120  func (mr *MockStreamMockRecorder) SetDeadline(arg0 any) *gomock.Call {
   121  	mr.mock.ctrl.T.Helper()
   122  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStream)(nil).SetDeadline), arg0)
   123  }
   124  
   125  // SetReadDeadline mocks base method.
   126  func (m *MockStream) SetReadDeadline(arg0 time.Time) error {
   127  	m.ctrl.T.Helper()
   128  	ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
   129  	ret0, _ := ret[0].(error)
   130  	return ret0
   131  }
   132  
   133  // SetReadDeadline indicates an expected call of SetReadDeadline.
   134  func (mr *MockStreamMockRecorder) SetReadDeadline(arg0 any) *gomock.Call {
   135  	mr.mock.ctrl.T.Helper()
   136  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStream)(nil).SetReadDeadline), arg0)
   137  }
   138  
   139  // SetWriteDeadline mocks base method.
   140  func (m *MockStream) SetWriteDeadline(arg0 time.Time) error {
   141  	m.ctrl.T.Helper()
   142  	ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
   143  	ret0, _ := ret[0].(error)
   144  	return ret0
   145  }
   146  
   147  // SetWriteDeadline indicates an expected call of SetWriteDeadline.
   148  func (mr *MockStreamMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call {
   149  	mr.mock.ctrl.T.Helper()
   150  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStream)(nil).SetWriteDeadline), arg0)
   151  }
   152  
   153  // StreamID mocks base method.
   154  func (m *MockStream) StreamID() protocol.StreamID {
   155  	m.ctrl.T.Helper()
   156  	ret := m.ctrl.Call(m, "StreamID")
   157  	ret0, _ := ret[0].(protocol.StreamID)
   158  	return ret0
   159  }
   160  
   161  // StreamID indicates an expected call of StreamID.
   162  func (mr *MockStreamMockRecorder) StreamID() *gomock.Call {
   163  	mr.mock.ctrl.T.Helper()
   164  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockStream)(nil).StreamID))
   165  }
   166  
   167  // Write mocks base method.
   168  func (m *MockStream) Write(arg0 []byte) (int, error) {
   169  	m.ctrl.T.Helper()
   170  	ret := m.ctrl.Call(m, "Write", arg0)
   171  	ret0, _ := ret[0].(int)
   172  	ret1, _ := ret[1].(error)
   173  	return ret0, ret1
   174  }
   175  
   176  // Write indicates an expected call of Write.
   177  func (mr *MockStreamMockRecorder) Write(arg0 any) *gomock.Call {
   178  	mr.mock.ctrl.T.Helper()
   179  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStream)(nil).Write), arg0)
   180  }