uquic/mock_mtu_discoverer_test.go
2025-04-01 11:48:45 -06:00

230 lines
7.4 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/refraction-networking/uquic (interfaces: MTUDiscoverer)
//
// Generated by this command:
//
// mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/quic-go/quic-go -destination mock_mtu_discoverer_test.go github.com/quic-go/quic-go MTUDiscoverer
//
// Package quic is a generated GoMock package.
package quic
import (
reflect "reflect"
time "time"
gomock "go.uber.org/mock/gomock"
ackhandler "github.com/refraction-networking/uquic/internal/ackhandler"
protocol "github.com/refraction-networking/uquic/internal/protocol"
)
// MockMTUDiscoverer is a mock of MTUDiscoverer interface.
type MockMTUDiscoverer struct {
ctrl *gomock.Controller
recorder *MockMTUDiscovererMockRecorder
isgomock struct{}
}
// MockMTUDiscovererMockRecorder is the mock recorder for MockMTUDiscoverer.
type MockMTUDiscovererMockRecorder struct {
mock *MockMTUDiscoverer
}
// NewMockMTUDiscoverer creates a new mock instance.
func NewMockMTUDiscoverer(ctrl *gomock.Controller) *MockMTUDiscoverer {
mock := &MockMTUDiscoverer{ctrl: ctrl}
mock.recorder = &MockMTUDiscovererMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMTUDiscoverer) EXPECT() *MockMTUDiscovererMockRecorder {
return m.recorder
}
// CurrentSize mocks base method.
func (m *MockMTUDiscoverer) CurrentSize() protocol.ByteCount {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CurrentSize")
ret0, _ := ret[0].(protocol.ByteCount)
return ret0
}
// CurrentSize indicates an expected call of CurrentSize.
func (mr *MockMTUDiscovererMockRecorder) CurrentSize() *MockMTUDiscovererCurrentSizeCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentSize", reflect.TypeOf((*MockMTUDiscoverer)(nil).CurrentSize))
return &MockMTUDiscovererCurrentSizeCall{Call: call}
}
// MockMTUDiscovererCurrentSizeCall wrap *gomock.Call
type MockMTUDiscovererCurrentSizeCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMTUDiscovererCurrentSizeCall) Return(arg0 protocol.ByteCount) *MockMTUDiscovererCurrentSizeCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMTUDiscovererCurrentSizeCall) Do(f func() protocol.ByteCount) *MockMTUDiscovererCurrentSizeCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMTUDiscovererCurrentSizeCall) DoAndReturn(f func() protocol.ByteCount) *MockMTUDiscovererCurrentSizeCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// GetPing mocks base method.
func (m *MockMTUDiscoverer) GetPing(now time.Time) (ackhandler.Frame, protocol.ByteCount) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPing", now)
ret0, _ := ret[0].(ackhandler.Frame)
ret1, _ := ret[1].(protocol.ByteCount)
return ret0, ret1
}
// GetPing indicates an expected call of GetPing.
func (mr *MockMTUDiscovererMockRecorder) GetPing(now any) *MockMTUDiscovererGetPingCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPing", reflect.TypeOf((*MockMTUDiscoverer)(nil).GetPing), now)
return &MockMTUDiscovererGetPingCall{Call: call}
}
// MockMTUDiscovererGetPingCall wrap *gomock.Call
type MockMTUDiscovererGetPingCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMTUDiscovererGetPingCall) Return(ping ackhandler.Frame, datagramSize protocol.ByteCount) *MockMTUDiscovererGetPingCall {
c.Call = c.Call.Return(ping, datagramSize)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMTUDiscovererGetPingCall) Do(f func(time.Time) (ackhandler.Frame, protocol.ByteCount)) *MockMTUDiscovererGetPingCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMTUDiscovererGetPingCall) DoAndReturn(f func(time.Time) (ackhandler.Frame, protocol.ByteCount)) *MockMTUDiscovererGetPingCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Reset mocks base method.
func (m *MockMTUDiscoverer) Reset(now time.Time, start, max protocol.ByteCount) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Reset", now, start, max)
}
// Reset indicates an expected call of Reset.
func (mr *MockMTUDiscovererMockRecorder) Reset(now, start, max any) *MockMTUDiscovererResetCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockMTUDiscoverer)(nil).Reset), now, start, max)
return &MockMTUDiscovererResetCall{Call: call}
}
// MockMTUDiscovererResetCall wrap *gomock.Call
type MockMTUDiscovererResetCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMTUDiscovererResetCall) Return() *MockMTUDiscovererResetCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMTUDiscovererResetCall) Do(f func(time.Time, protocol.ByteCount, protocol.ByteCount)) *MockMTUDiscovererResetCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMTUDiscovererResetCall) DoAndReturn(f func(time.Time, protocol.ByteCount, protocol.ByteCount)) *MockMTUDiscovererResetCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// ShouldSendProbe mocks base method.
func (m *MockMTUDiscoverer) ShouldSendProbe(now time.Time) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ShouldSendProbe", now)
ret0, _ := ret[0].(bool)
return ret0
}
// ShouldSendProbe indicates an expected call of ShouldSendProbe.
func (mr *MockMTUDiscovererMockRecorder) ShouldSendProbe(now any) *MockMTUDiscovererShouldSendProbeCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldSendProbe", reflect.TypeOf((*MockMTUDiscoverer)(nil).ShouldSendProbe), now)
return &MockMTUDiscovererShouldSendProbeCall{Call: call}
}
// MockMTUDiscovererShouldSendProbeCall wrap *gomock.Call
type MockMTUDiscovererShouldSendProbeCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMTUDiscovererShouldSendProbeCall) Return(arg0 bool) *MockMTUDiscovererShouldSendProbeCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMTUDiscovererShouldSendProbeCall) Do(f func(time.Time) bool) *MockMTUDiscovererShouldSendProbeCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMTUDiscovererShouldSendProbeCall) DoAndReturn(f func(time.Time) bool) *MockMTUDiscovererShouldSendProbeCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Start mocks base method.
func (m *MockMTUDiscoverer) Start(now time.Time) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Start", now)
}
// Start indicates an expected call of Start.
func (mr *MockMTUDiscovererMockRecorder) Start(now any) *MockMTUDiscovererStartCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockMTUDiscoverer)(nil).Start), now)
return &MockMTUDiscovererStartCall{Call: call}
}
// MockMTUDiscovererStartCall wrap *gomock.Call
type MockMTUDiscovererStartCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockMTUDiscovererStartCall) Return() *MockMTUDiscovererStartCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockMTUDiscovererStartCall) Do(f func(time.Time)) *MockMTUDiscovererStartCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockMTUDiscovererStartCall) DoAndReturn(f func(time.Time)) *MockMTUDiscovererStartCall {
c.Call = c.Call.DoAndReturn(f)
return c
}