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

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/daeuniverse/quic-go (interfaces: SendConn)
     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_send_conn_test.go github.com/daeuniverse/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/daeuniverse/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  // SetRemoteAddr mocks base method.
   158  func (m *MockSendConn) SetRemoteAddr(arg0 net.Addr) {
   159  	m.ctrl.T.Helper()
   160  	m.ctrl.Call(m, "SetRemoteAddr", arg0)
   161  }
   162  
   163  // SetRemoteAddr indicates an expected call of SetRemoteAddr.
   164  func (mr *MockSendConnMockRecorder) SetRemoteAddr(arg0 any) *MockSendConnSetRemoteAddrCall {
   165  	mr.mock.ctrl.T.Helper()
   166  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRemoteAddr", reflect.TypeOf((*MockSendConn)(nil).SetRemoteAddr), arg0)
   167  	return &MockSendConnSetRemoteAddrCall{Call: call}
   168  }
   169  
   170  // MockSendConnSetRemoteAddrCall wrap *gomock.Call
   171  type MockSendConnSetRemoteAddrCall struct {
   172  	*gomock.Call
   173  }
   174  
   175  // Return rewrite *gomock.Call.Return
   176  func (c *MockSendConnSetRemoteAddrCall) Return() *MockSendConnSetRemoteAddrCall {
   177  	c.Call = c.Call.Return()
   178  	return c
   179  }
   180  
   181  // Do rewrite *gomock.Call.Do
   182  func (c *MockSendConnSetRemoteAddrCall) Do(f func(net.Addr)) *MockSendConnSetRemoteAddrCall {
   183  	c.Call = c.Call.Do(f)
   184  	return c
   185  }
   186  
   187  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   188  func (c *MockSendConnSetRemoteAddrCall) DoAndReturn(f func(net.Addr)) *MockSendConnSetRemoteAddrCall {
   189  	c.Call = c.Call.DoAndReturn(f)
   190  	return c
   191  }
   192  
   193  // Write mocks base method.
   194  func (m *MockSendConn) Write(arg0 []byte, arg1 uint16, arg2 protocol.ECN) error {
   195  	m.ctrl.T.Helper()
   196  	ret := m.ctrl.Call(m, "Write", arg0, arg1, arg2)
   197  	ret0, _ := ret[0].(error)
   198  	return ret0
   199  }
   200  
   201  // Write indicates an expected call of Write.
   202  func (mr *MockSendConnMockRecorder) Write(arg0, arg1, arg2 any) *MockSendConnWriteCall {
   203  	mr.mock.ctrl.T.Helper()
   204  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockSendConn)(nil).Write), arg0, arg1, arg2)
   205  	return &MockSendConnWriteCall{Call: call}
   206  }
   207  
   208  // MockSendConnWriteCall wrap *gomock.Call
   209  type MockSendConnWriteCall struct {
   210  	*gomock.Call
   211  }
   212  
   213  // Return rewrite *gomock.Call.Return
   214  func (c *MockSendConnWriteCall) Return(arg0 error) *MockSendConnWriteCall {
   215  	c.Call = c.Call.Return(arg0)
   216  	return c
   217  }
   218  
   219  // Do rewrite *gomock.Call.Do
   220  func (c *MockSendConnWriteCall) Do(f func([]byte, uint16, protocol.ECN) error) *MockSendConnWriteCall {
   221  	c.Call = c.Call.Do(f)
   222  	return c
   223  }
   224  
   225  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   226  func (c *MockSendConnWriteCall) DoAndReturn(f func([]byte, uint16, protocol.ECN) error) *MockSendConnWriteCall {
   227  	c.Call = c.Call.DoAndReturn(f)
   228  	return c
   229  }
   230  
   231  // capabilities mocks base method.
   232  func (m *MockSendConn) capabilities() connCapabilities {
   233  	m.ctrl.T.Helper()
   234  	ret := m.ctrl.Call(m, "capabilities")
   235  	ret0, _ := ret[0].(connCapabilities)
   236  	return ret0
   237  }
   238  
   239  // capabilities indicates an expected call of capabilities.
   240  func (mr *MockSendConnMockRecorder) capabilities() *MockSendConncapabilitiesCall {
   241  	mr.mock.ctrl.T.Helper()
   242  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "capabilities", reflect.TypeOf((*MockSendConn)(nil).capabilities))
   243  	return &MockSendConncapabilitiesCall{Call: call}
   244  }
   245  
   246  // MockSendConncapabilitiesCall wrap *gomock.Call
   247  type MockSendConncapabilitiesCall struct {
   248  	*gomock.Call
   249  }
   250  
   251  // Return rewrite *gomock.Call.Return
   252  func (c *MockSendConncapabilitiesCall) Return(arg0 connCapabilities) *MockSendConncapabilitiesCall {
   253  	c.Call = c.Call.Return(arg0)
   254  	return c
   255  }
   256  
   257  // Do rewrite *gomock.Call.Do
   258  func (c *MockSendConncapabilitiesCall) Do(f func() connCapabilities) *MockSendConncapabilitiesCall {
   259  	c.Call = c.Call.Do(f)
   260  	return c
   261  }
   262  
   263  // DoAndReturn rewrite *gomock.Call.DoAndReturn
   264  func (c *MockSendConncapabilitiesCall) DoAndReturn(f func() connCapabilities) *MockSendConncapabilitiesCall {
   265  	c.Call = c.Call.DoAndReturn(f)
   266  	return c
   267  }