github.com/MerlinKodo/quic-go@v0.39.2/mock_quic_conn_test.go (about)

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