Files
quic-go/http3/mock_singleroundtripper_test.go
2024-04-11 09:55:05 -07:00

120 lines
4.3 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/quic-go/quic-go/http3 (interfaces: SingleRoundTripper)
//
// Generated by this command:
//
// mockgen -typed -build_flags=-tags=gomock -package http3 -destination mock_singleroundtripper_test.go github.com/quic-go/quic-go/http3 SingleRoundTripper
//
// Package http3 is a generated GoMock package.
package http3
import (
context "context"
http "net/http"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockSingleRoundTripper is a mock of SingleRoundTripper interface.
type MockSingleRoundTripper struct {
ctrl *gomock.Controller
recorder *MockSingleRoundTripperMockRecorder
}
// MockSingleRoundTripperMockRecorder is the mock recorder for MockSingleRoundTripper.
type MockSingleRoundTripperMockRecorder struct {
mock *MockSingleRoundTripper
}
// NewMockSingleRoundTripper creates a new mock instance.
func NewMockSingleRoundTripper(ctrl *gomock.Controller) *MockSingleRoundTripper {
mock := &MockSingleRoundTripper{ctrl: ctrl}
mock.recorder = &MockSingleRoundTripperMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSingleRoundTripper) EXPECT() *MockSingleRoundTripperMockRecorder {
return m.recorder
}
// OpenRequestStream mocks base method.
func (m *MockSingleRoundTripper) OpenRequestStream(arg0 context.Context) (RequestStream, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OpenRequestStream", arg0)
ret0, _ := ret[0].(RequestStream)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// OpenRequestStream indicates an expected call of OpenRequestStream.
func (mr *MockSingleRoundTripperMockRecorder) OpenRequestStream(arg0 any) *MockSingleRoundTripperOpenRequestStreamCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenRequestStream", reflect.TypeOf((*MockSingleRoundTripper)(nil).OpenRequestStream), arg0)
return &MockSingleRoundTripperOpenRequestStreamCall{Call: call}
}
// MockSingleRoundTripperOpenRequestStreamCall wrap *gomock.Call
type MockSingleRoundTripperOpenRequestStreamCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockSingleRoundTripperOpenRequestStreamCall) Return(arg0 RequestStream, arg1 error) *MockSingleRoundTripperOpenRequestStreamCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockSingleRoundTripperOpenRequestStreamCall) Do(f func(context.Context) (RequestStream, error)) *MockSingleRoundTripperOpenRequestStreamCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockSingleRoundTripperOpenRequestStreamCall) DoAndReturn(f func(context.Context) (RequestStream, error)) *MockSingleRoundTripperOpenRequestStreamCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// RoundTripOpt mocks base method.
func (m *MockSingleRoundTripper) RoundTripOpt(arg0 *http.Request, arg1 RoundTripOpt) (*http.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RoundTripOpt", arg0, arg1)
ret0, _ := ret[0].(*http.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RoundTripOpt indicates an expected call of RoundTripOpt.
func (mr *MockSingleRoundTripperMockRecorder) RoundTripOpt(arg0, arg1 any) *MockSingleRoundTripperRoundTripOptCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTripOpt", reflect.TypeOf((*MockSingleRoundTripper)(nil).RoundTripOpt), arg0, arg1)
return &MockSingleRoundTripperRoundTripOptCall{Call: call}
}
// MockSingleRoundTripperRoundTripOptCall wrap *gomock.Call
type MockSingleRoundTripperRoundTripOptCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockSingleRoundTripperRoundTripOptCall) Return(arg0 *http.Response, arg1 error) *MockSingleRoundTripperRoundTripOptCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockSingleRoundTripperRoundTripOptCall) Do(f func(*http.Request, RoundTripOpt) (*http.Response, error)) *MockSingleRoundTripperRoundTripOptCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockSingleRoundTripperRoundTripOptCall) DoAndReturn(f func(*http.Request, RoundTripOpt) (*http.Response, error)) *MockSingleRoundTripperRoundTripOptCall {
c.Call = c.Call.DoAndReturn(f)
return c
}