1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/quic-go/quic-go/http3 (interfaces: QUICListener)
//
// Generated by this command:
//
// mockgen -typed -package http3 -destination mock_quic_listener_test.go github.com/quic-go/quic-go/http3 QUICListener
//
// Package http3 is a generated GoMock package.
package http3
import (
context "context"
net "net"
reflect "reflect"
quic "github.com/quic-go/quic-go"
gomock "go.uber.org/mock/gomock"
)
// MockQUICListener is a mock of QUICListener interface.
type MockQUICListener struct {
ctrl *gomock.Controller
recorder *MockQUICListenerMockRecorder
isgomock struct{}
}
// MockQUICListenerMockRecorder is the mock recorder for MockQUICListener.
type MockQUICListenerMockRecorder struct {
mock *MockQUICListener
}
// NewMockQUICListener creates a new mock instance.
func NewMockQUICListener(ctrl *gomock.Controller) *MockQUICListener {
mock := &MockQUICListener{ctrl: ctrl}
mock.recorder = &MockQUICListenerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockQUICListener) EXPECT() *MockQUICListenerMockRecorder {
return m.recorder
}
// Accept mocks base method.
func (m *MockQUICListener) Accept(arg0 context.Context) (*quic.Conn, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Accept", arg0)
ret0, _ := ret[0].(*quic.Conn)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Accept indicates an expected call of Accept.
func (mr *MockQUICListenerMockRecorder) Accept(arg0 any) *MockQUICListenerAcceptCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Accept", reflect.TypeOf((*MockQUICListener)(nil).Accept), arg0)
return &MockQUICListenerAcceptCall{Call: call}
}
// MockQUICListenerAcceptCall wrap *gomock.Call
type MockQUICListenerAcceptCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICListenerAcceptCall) Return(arg0 *quic.Conn, arg1 error) *MockQUICListenerAcceptCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICListenerAcceptCall) Do(f func(context.Context) (*quic.Conn, error)) *MockQUICListenerAcceptCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICListenerAcceptCall) DoAndReturn(f func(context.Context) (*quic.Conn, error)) *MockQUICListenerAcceptCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Addr mocks base method.
func (m *MockQUICListener) Addr() net.Addr {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Addr")
ret0, _ := ret[0].(net.Addr)
return ret0
}
// Addr indicates an expected call of Addr.
func (mr *MockQUICListenerMockRecorder) Addr() *MockQUICListenerAddrCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addr", reflect.TypeOf((*MockQUICListener)(nil).Addr))
return &MockQUICListenerAddrCall{Call: call}
}
// MockQUICListenerAddrCall wrap *gomock.Call
type MockQUICListenerAddrCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICListenerAddrCall) Return(arg0 net.Addr) *MockQUICListenerAddrCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICListenerAddrCall) Do(f func() net.Addr) *MockQUICListenerAddrCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICListenerAddrCall) DoAndReturn(f func() net.Addr) *MockQUICListenerAddrCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Close mocks base method.
func (m *MockQUICListener) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockQUICListenerMockRecorder) Close() *MockQUICListenerCloseCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockQUICListener)(nil).Close))
return &MockQUICListenerCloseCall{Call: call}
}
// MockQUICListenerCloseCall wrap *gomock.Call
type MockQUICListenerCloseCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQUICListenerCloseCall) Return(arg0 error) *MockQUICListenerCloseCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQUICListenerCloseCall) Do(f func() error) *MockQUICListenerCloseCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQUICListenerCloseCall) DoAndReturn(f func() error) *MockQUICListenerCloseCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
|