github.com/metacubex/quic-go@v0.44.1-0.20240520163451-20b689a59136/mock_mtu_discoverer_test.go (about)

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