github.com/TugasAkhir-QUIC/quic-go@v0.0.2-0.20240215011318-d20e25a9054c/mock_packetconn_test.go (about)

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