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

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/quic-go/quic-go (interfaces: SendConn)
     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_conn_test.go github.com/quic-go/quic-go SendConn
     7  //
     8  
     9  // Package quic is a generated GoMock package.
    10  package quic
    11  
    12  import (
    13  	net "net"
    14  	reflect "reflect"
    15  
    16  	protocol "github.com/quic-go/quic-go/internal/protocol"
    17  	gomock "go.uber.org/mock/gomock"
    18  )
    19  
    20  // MockSendConn is a mock of SendConn interface.
    21  type MockSendConn struct {
    22  	ctrl     *gomock.Controller
    23  	recorder *MockSendConnMockRecorder
    24  }
    25  
    26  // MockSendConnMockRecorder is the mock recorder for MockSendConn.
    27  type MockSendConnMockRecorder struct {
    28  	mock *MockSendConn
    29  }
    30  
    31  // NewMockSendConn creates a new mock instance.
    32  func NewMockSendConn(ctrl *gomock.Controller) *MockSendConn {
    33  	mock := &MockSendConn{ctrl: ctrl}
    34  	mock.recorder = &MockSendConnMockRecorder{mock}
    35  	return mock
    36  }
    37  
    38  // EXPECT returns an object that allows the caller to indicate expected use.
    39  func (m *MockSendConn) EXPECT() *MockSendConnMockRecorder {
    40  	return m.recorder
    41  }
    42  
    43  // Close mocks base method.
    44  func (m *MockSendConn) Close() error {
    45  	m.ctrl.T.Helper()
    46  	ret := m.ctrl.Call(m, "Close")
    47  	ret0, _ := ret[0].(error)
    48  	return ret0
    49  }
    50  
    51  // Close indicates an expected call of Close.
    52  func (mr *MockSendConnMockRecorder) Close() *MockSendConnCloseCall {
    53  	mr.mock.ctrl.T.Helper()
    54  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSendConn)(nil).Close))
    55  	return &MockSendConnCloseCall{Call: call}
    56  }
    57  
    58  // MockSendConnCloseCall wrap *gomock.Call
    59  type MockSendConnCloseCall struct {
    60  	*gomock.Call
    61  }
    62  
    63  // Return rewrite *gomock.Call.Return
    64  func (c *MockSendConnCloseCall) Return(arg0 error) *MockSendConnCloseCall {
    65  	c.Call = c.Call.Return(arg0)
    66  	return c
    67  }
    68  
    69  // Do rewrite *gomock.Call.Do
    70  func (c *MockSendConnCloseCall) Do(f func() error) *MockSendConnCloseCall {
    71  	c.Call = c.Call.Do(f)
    72  	return c
    73  }
    74  
    75  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    76  func (c *MockSendConnCloseCall) DoAndReturn(f func() error) *MockSendConnCloseCall {
    77  	c.Call = c.Call.DoAndReturn(f)
    78  	return c
    79  }
    80  
    81  // LocalAddr mocks base method.
    82  func (m *MockSendConn) LocalAddr() net.Addr {
    83  	m.ctrl.T.Helper()
    84  	ret := m.ctrl.Call(m, "LocalAddr")
    85  	ret0, _ := ret[0].(net.Addr)
    86  	return ret0
    87  }
    88  
    89  // LocalAddr indicates an expected call of LocalAddr.
    90  func (mr *MockSendConnMockRecorder) LocalAddr() *MockSendConnLocalAddrCall {
    91  	mr.mock.ctrl.T.Helper()
    92  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockSendConn)(nil).LocalAddr))
    93  	return &MockSendConnLocalAddrCall{Call: call}
    94  }
    95  
    96  // MockSendConnLocalAddrCall wrap *gomock.Call
    97  type MockSendConnLocalAddrCall struct {
    98  	*gomock.Call
    99  }
   100  
   101  // Return rewrite *gomock.Call.Return
   102  func (c *MockSendConnLocalAddrCall) Return(arg0 net.Addr) *MockSendConnLocalAddrCall {
   103  	c.Call = c.Call.Return(arg0)
   104  	return c
   105  }
   106  
   107  // Do rewrite *gomock.Call.Do
   108  func (c *MockSendConnLocalAddrCall) Do(f func() net.Addr) *MockSendConnLocalAddrCall {
   109  	c.Call = c.Call.Do(f)
   110  	return c
   111  }
   112  
   113  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   114  func (c *MockSendConnLocalAddrCall) DoAndReturn(f func() net.Addr) *MockSendConnLocalAddrCall {
   115  	c.Call = c.Call.DoAndReturn(f)
   116  	return c
   117  }
   118  
   119  // RemoteAddr mocks base method.
   120  func (m *MockSendConn) RemoteAddr() net.Addr {
   121  	m.ctrl.T.Helper()
   122  	ret := m.ctrl.Call(m, "RemoteAddr")
   123  	ret0, _ := ret[0].(net.Addr)
   124  	return ret0
   125  }
   126  
   127  // RemoteAddr indicates an expected call of RemoteAddr.
   128  func (mr *MockSendConnMockRecorder) RemoteAddr() *MockSendConnRemoteAddrCall {
   129  	mr.mock.ctrl.T.Helper()
   130  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockSendConn)(nil).RemoteAddr))
   131  	return &MockSendConnRemoteAddrCall{Call: call}
   132  }
   133  
   134  // MockSendConnRemoteAddrCall wrap *gomock.Call
   135  type MockSendConnRemoteAddrCall struct {
   136  	*gomock.Call
   137  }
   138  
   139  // Return rewrite *gomock.Call.Return
   140  func (c *MockSendConnRemoteAddrCall) Return(arg0 net.Addr) *MockSendConnRemoteAddrCall {
   141  	c.Call = c.Call.Return(arg0)
   142  	return c
   143  }
   144  
   145  // Do rewrite *gomock.Call.Do
   146  func (c *MockSendConnRemoteAddrCall) Do(f func() net.Addr) *MockSendConnRemoteAddrCall {
   147  	c.Call = c.Call.Do(f)
   148  	return c
   149  }
   150  
   151  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   152  func (c *MockSendConnRemoteAddrCall) DoAndReturn(f func() net.Addr) *MockSendConnRemoteAddrCall {
   153  	c.Call = c.Call.DoAndReturn(f)
   154  	return c
   155  }
   156  
   157  // Write mocks base method.
   158  func (m *MockSendConn) Write(arg0 []byte, arg1 uint16, arg2 protocol.ECN) error {
   159  	m.ctrl.T.Helper()
   160  	ret := m.ctrl.Call(m, "Write", arg0, arg1, arg2)
   161  	ret0, _ := ret[0].(error)
   162  	return ret0
   163  }
   164  
   165  // Write indicates an expected call of Write.
   166  func (mr *MockSendConnMockRecorder) Write(arg0, arg1, arg2 any) *MockSendConnWriteCall {
   167  	mr.mock.ctrl.T.Helper()
   168  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendConn)(nil).Write), arg0, arg1, arg2)
   169  	return &MockSendConnWriteCall{Call: call}
   170  }
   171  
   172  // MockSendConnWriteCall wrap *gomock.Call
   173  type MockSendConnWriteCall struct {
   174  	*gomock.Call
   175  }
   176  
   177  // Return rewrite *gomock.Call.Return
   178  func (c *MockSendConnWriteCall) Return(arg0 error) *MockSendConnWriteCall {
   179  	c.Call = c.Call.Return(arg0)
   180  	return c
   181  }
   182  
   183  // Do rewrite *gomock.Call.Do
   184  func (c *MockSendConnWriteCall) Do(f func([]byte, uint16, protocol.ECN) error) *MockSendConnWriteCall {
   185  	c.Call = c.Call.Do(f)
   186  	return c
   187  }
   188  
   189  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   190  func (c *MockSendConnWriteCall) DoAndReturn(f func([]byte, uint16, protocol.ECN) error) *MockSendConnWriteCall {
   191  	c.Call = c.Call.DoAndReturn(f)
   192  	return c
   193  }
   194  
   195  // capabilities mocks base method.
   196  func (m *MockSendConn) capabilities() connCapabilities {
   197  	m.ctrl.T.Helper()
   198  	ret := m.ctrl.Call(m, "capabilities")
   199  	ret0, _ := ret[0].(connCapabilities)
   200  	return ret0
   201  }
   202  
   203  // capabilities indicates an expected call of capabilities.
   204  func (mr *MockSendConnMockRecorder) capabilities() *MockSendConncapabilitiesCall {
   205  	mr.mock.ctrl.T.Helper()
   206  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "capabilities", reflect.TypeOf((*MockSendConn)(nil).capabilities))
   207  	return &MockSendConncapabilitiesCall{Call: call}
   208  }
   209  
   210  // MockSendConncapabilitiesCall wrap *gomock.Call
   211  type MockSendConncapabilitiesCall struct {
   212  	*gomock.Call
   213  }
   214  
   215  // Return rewrite *gomock.Call.Return
   216  func (c *MockSendConncapabilitiesCall) Return(arg0 connCapabilities) *MockSendConncapabilitiesCall {
   217  	c.Call = c.Call.Return(arg0)
   218  	return c
   219  }
   220  
   221  // Do rewrite *gomock.Call.Do
   222  func (c *MockSendConncapabilitiesCall) Do(f func() connCapabilities) *MockSendConncapabilitiesCall {
   223  	c.Call = c.Call.Do(f)
   224  	return c
   225  }
   226  
   227  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   228  func (c *MockSendConncapabilitiesCall) DoAndReturn(f func() connCapabilities) *MockSendConncapabilitiesCall {
   229  	c.Call = c.Call.DoAndReturn(f)
   230  	return c
   231  }