forked from quic-go/quic-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_crypto_stream_test.go
125 lines (107 loc) · 4.07 KB
/
mock_crypto_stream_test.go
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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/quic-go/quic-go (interfaces: CryptoStream)
//
// Generated by this command:
//
// mockgen -build_flags=-tags=gomock -package quic -self_package github.com/quic-go/quic-go -destination mock_crypto_stream_test.go github.com/quic-go/quic-go CryptoStream
//
// Package quic is a generated GoMock package.
package quic
import (
reflect "reflect"
protocol "github.com/quic-go/quic-go/internal/protocol"
wire "github.com/quic-go/quic-go/internal/wire"
gomock "go.uber.org/mock/gomock"
)
// MockCryptoStream is a mock of CryptoStream interface.
type MockCryptoStream struct {
ctrl *gomock.Controller
recorder *MockCryptoStreamMockRecorder
}
// MockCryptoStreamMockRecorder is the mock recorder for MockCryptoStream.
type MockCryptoStreamMockRecorder struct {
mock *MockCryptoStream
}
// NewMockCryptoStream creates a new mock instance.
func NewMockCryptoStream(ctrl *gomock.Controller) *MockCryptoStream {
mock := &MockCryptoStream{ctrl: ctrl}
mock.recorder = &MockCryptoStreamMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCryptoStream) EXPECT() *MockCryptoStreamMockRecorder {
return m.recorder
}
// Finish mocks base method.
func (m *MockCryptoStream) Finish() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Finish")
ret0, _ := ret[0].(error)
return ret0
}
// Finish indicates an expected call of Finish.
func (mr *MockCryptoStreamMockRecorder) Finish() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finish", reflect.TypeOf((*MockCryptoStream)(nil).Finish))
}
// GetCryptoData mocks base method.
func (m *MockCryptoStream) GetCryptoData() []byte {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCryptoData")
ret0, _ := ret[0].([]byte)
return ret0
}
// GetCryptoData indicates an expected call of GetCryptoData.
func (mr *MockCryptoStreamMockRecorder) GetCryptoData() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCryptoData", reflect.TypeOf((*MockCryptoStream)(nil).GetCryptoData))
}
// HandleCryptoFrame mocks base method.
func (m *MockCryptoStream) HandleCryptoFrame(arg0 *wire.CryptoFrame) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleCryptoFrame", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// HandleCryptoFrame indicates an expected call of HandleCryptoFrame.
func (mr *MockCryptoStreamMockRecorder) HandleCryptoFrame(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleCryptoFrame", reflect.TypeOf((*MockCryptoStream)(nil).HandleCryptoFrame), arg0)
}
// HasData mocks base method.
func (m *MockCryptoStream) HasData() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HasData")
ret0, _ := ret[0].(bool)
return ret0
}
// HasData indicates an expected call of HasData.
func (mr *MockCryptoStreamMockRecorder) HasData() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasData", reflect.TypeOf((*MockCryptoStream)(nil).HasData))
}
// PopCryptoFrame mocks base method.
func (m *MockCryptoStream) PopCryptoFrame(arg0 protocol.ByteCount) *wire.CryptoFrame {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PopCryptoFrame", arg0)
ret0, _ := ret[0].(*wire.CryptoFrame)
return ret0
}
// PopCryptoFrame indicates an expected call of PopCryptoFrame.
func (mr *MockCryptoStreamMockRecorder) PopCryptoFrame(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopCryptoFrame", reflect.TypeOf((*MockCryptoStream)(nil).PopCryptoFrame), arg0)
}
// Write mocks base method.
func (m *MockCryptoStream) Write(arg0 []byte) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Write", arg0)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Write indicates an expected call of Write.
func (mr *MockCryptoStreamMockRecorder) Write(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCryptoStream)(nil).Write), arg0)
}