github.com/apernet/quic-go@v0.43.1-0.20240515053213-5e9e635fd9f0/http3/mock_singleroundtripper_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/apernet/quic-go/http3 (interfaces: SingleRoundTripper) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package http3 -destination mock_singleroundtripper_test.go github.com/apernet/quic-go/http3 SingleRoundTripper 7 // 8 9 // Package http3 is a generated GoMock package. 10 package http3 11 12 import ( 13 context "context" 14 http "net/http" 15 reflect "reflect" 16 17 gomock "go.uber.org/mock/gomock" 18 ) 19 20 // MockSingleRoundTripper is a mock of SingleRoundTripper interface. 21 type MockSingleRoundTripper struct { 22 ctrl *gomock.Controller 23 recorder *MockSingleRoundTripperMockRecorder 24 } 25 26 // MockSingleRoundTripperMockRecorder is the mock recorder for MockSingleRoundTripper. 27 type MockSingleRoundTripperMockRecorder struct { 28 mock *MockSingleRoundTripper 29 } 30 31 // NewMockSingleRoundTripper creates a new mock instance. 32 func NewMockSingleRoundTripper(ctrl *gomock.Controller) *MockSingleRoundTripper { 33 mock := &MockSingleRoundTripper{ctrl: ctrl} 34 mock.recorder = &MockSingleRoundTripperMockRecorder{mock} 35 return mock 36 } 37 38 // EXPECT returns an object that allows the caller to indicate expected use. 39 func (m *MockSingleRoundTripper) EXPECT() *MockSingleRoundTripperMockRecorder { 40 return m.recorder 41 } 42 43 // OpenRequestStream mocks base method. 44 func (m *MockSingleRoundTripper) OpenRequestStream(arg0 context.Context) (RequestStream, error) { 45 m.ctrl.T.Helper() 46 ret := m.ctrl.Call(m, "OpenRequestStream", arg0) 47 ret0, _ := ret[0].(RequestStream) 48 ret1, _ := ret[1].(error) 49 return ret0, ret1 50 } 51 52 // OpenRequestStream indicates an expected call of OpenRequestStream. 53 func (mr *MockSingleRoundTripperMockRecorder) OpenRequestStream(arg0 any) *MockSingleRoundTripperOpenRequestStreamCall { 54 mr.mock.ctrl.T.Helper() 55 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenRequestStream", reflect.TypeOf((*MockSingleRoundTripper)(nil).OpenRequestStream), arg0) 56 return &MockSingleRoundTripperOpenRequestStreamCall{Call: call} 57 } 58 59 // MockSingleRoundTripperOpenRequestStreamCall wrap *gomock.Call 60 type MockSingleRoundTripperOpenRequestStreamCall struct { 61 *gomock.Call 62 } 63 64 // Return rewrite *gomock.Call.Return 65 func (c *MockSingleRoundTripperOpenRequestStreamCall) Return(arg0 RequestStream, arg1 error) *MockSingleRoundTripperOpenRequestStreamCall { 66 c.Call = c.Call.Return(arg0, arg1) 67 return c 68 } 69 70 // Do rewrite *gomock.Call.Do 71 func (c *MockSingleRoundTripperOpenRequestStreamCall) Do(f func(context.Context) (RequestStream, error)) *MockSingleRoundTripperOpenRequestStreamCall { 72 c.Call = c.Call.Do(f) 73 return c 74 } 75 76 // DoAndReturn rewrite *gomock.Call.DoAndReturn 77 func (c *MockSingleRoundTripperOpenRequestStreamCall) DoAndReturn(f func(context.Context) (RequestStream, error)) *MockSingleRoundTripperOpenRequestStreamCall { 78 c.Call = c.Call.DoAndReturn(f) 79 return c 80 } 81 82 // RoundTrip mocks base method. 83 func (m *MockSingleRoundTripper) RoundTrip(arg0 *http.Request) (*http.Response, error) { 84 m.ctrl.T.Helper() 85 ret := m.ctrl.Call(m, "RoundTrip", arg0) 86 ret0, _ := ret[0].(*http.Response) 87 ret1, _ := ret[1].(error) 88 return ret0, ret1 89 } 90 91 // RoundTrip indicates an expected call of RoundTrip. 92 func (mr *MockSingleRoundTripperMockRecorder) RoundTrip(arg0 any) *MockSingleRoundTripperRoundTripCall { 93 mr.mock.ctrl.T.Helper() 94 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockSingleRoundTripper)(nil).RoundTrip), arg0) 95 return &MockSingleRoundTripperRoundTripCall{Call: call} 96 } 97 98 // MockSingleRoundTripperRoundTripCall wrap *gomock.Call 99 type MockSingleRoundTripperRoundTripCall struct { 100 *gomock.Call 101 } 102 103 // Return rewrite *gomock.Call.Return 104 func (c *MockSingleRoundTripperRoundTripCall) Return(arg0 *http.Response, arg1 error) *MockSingleRoundTripperRoundTripCall { 105 c.Call = c.Call.Return(arg0, arg1) 106 return c 107 } 108 109 // Do rewrite *gomock.Call.Do 110 func (c *MockSingleRoundTripperRoundTripCall) Do(f func(*http.Request) (*http.Response, error)) *MockSingleRoundTripperRoundTripCall { 111 c.Call = c.Call.Do(f) 112 return c 113 } 114 115 // DoAndReturn rewrite *gomock.Call.DoAndReturn 116 func (c *MockSingleRoundTripperRoundTripCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockSingleRoundTripperRoundTripCall { 117 c.Call = c.Call.DoAndReturn(f) 118 return c 119 }