File: mock_clientconn_test.go

package info (click to toggle)
golang-github-lucas-clemente-quic-go 0.54.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,312 kB
  • sloc: sh: 54; makefile: 7
file content (120 lines) | stat: -rw-r--r-- 4,015 bytes parent folder | download | duplicates (2)
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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/quic-go/quic-go/http3 (interfaces: TestClientConnInterface)
//
// Generated by this command:
//
//	mockgen -typed -build_flags=-tags=gomock -mock_names=TestClientConnInterface=MockClientConn -package http3 -destination mock_clientconn_test.go github.com/quic-go/quic-go/http3 TestClientConnInterface
//

// Package http3 is a generated GoMock package.
package http3

import (
	context "context"
	http "net/http"
	reflect "reflect"

	gomock "go.uber.org/mock/gomock"
)

// MockClientConn is a mock of TestClientConnInterface interface.
type MockClientConn struct {
	ctrl     *gomock.Controller
	recorder *MockClientConnMockRecorder
	isgomock struct{}
}

// MockClientConnMockRecorder is the mock recorder for MockClientConn.
type MockClientConnMockRecorder struct {
	mock *MockClientConn
}

// NewMockClientConn creates a new mock instance.
func NewMockClientConn(ctrl *gomock.Controller) *MockClientConn {
	mock := &MockClientConn{ctrl: ctrl}
	mock.recorder = &MockClientConnMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClientConn) EXPECT() *MockClientConnMockRecorder {
	return m.recorder
}

// OpenRequestStream mocks base method.
func (m *MockClientConn) 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 *MockClientConnMockRecorder) OpenRequestStream(arg0 any) *MockClientConnOpenRequestStreamCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenRequestStream", reflect.TypeOf((*MockClientConn)(nil).OpenRequestStream), arg0)
	return &MockClientConnOpenRequestStreamCall{Call: call}
}

// MockClientConnOpenRequestStreamCall wrap *gomock.Call
type MockClientConnOpenRequestStreamCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockClientConnOpenRequestStreamCall) Return(arg0 *RequestStream, arg1 error) *MockClientConnOpenRequestStreamCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockClientConnOpenRequestStreamCall) Do(f func(context.Context) (*RequestStream, error)) *MockClientConnOpenRequestStreamCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockClientConnOpenRequestStreamCall) DoAndReturn(f func(context.Context) (*RequestStream, error)) *MockClientConnOpenRequestStreamCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}

// RoundTrip mocks base method.
func (m *MockClientConn) RoundTrip(arg0 *http.Request) (*http.Response, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "RoundTrip", arg0)
	ret0, _ := ret[0].(*http.Response)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// RoundTrip indicates an expected call of RoundTrip.
func (mr *MockClientConnMockRecorder) RoundTrip(arg0 any) *MockClientConnRoundTripCall {
	mr.mock.ctrl.T.Helper()
	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RoundTrip", reflect.TypeOf((*MockClientConn)(nil).RoundTrip), arg0)
	return &MockClientConnRoundTripCall{Call: call}
}

// MockClientConnRoundTripCall wrap *gomock.Call
type MockClientConnRoundTripCall struct {
	*gomock.Call
}

// Return rewrite *gomock.Call.Return
func (c *MockClientConnRoundTripCall) Return(arg0 *http.Response, arg1 error) *MockClientConnRoundTripCall {
	c.Call = c.Call.Return(arg0, arg1)
	return c
}

// Do rewrite *gomock.Call.Do
func (c *MockClientConnRoundTripCall) Do(f func(*http.Request) (*http.Response, error)) *MockClientConnRoundTripCall {
	c.Call = c.Call.Do(f)
	return c
}

// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockClientConnRoundTripCall) DoAndReturn(f func(*http.Request) (*http.Response, error)) *MockClientConnRoundTripCall {
	c.Call = c.Call.DoAndReturn(f)
	return c
}