github.com/danielpfeifer02/quic-go-prio-packs@v0.41.0-28/mock_crypto_stream_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/danielpfeifer02/quic-go-prio-packs (interfaces: CryptoStream) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/danielpfeifer02/quic-go-prio-packs -destination mock_crypto_stream_test.go github.com/danielpfeifer02/quic-go-prio-packs CryptoStream 7 // 8 // Package quic is a generated GoMock package. 9 package quic 10 11 import ( 12 reflect "reflect" 13 14 protocol "github.com/danielpfeifer02/quic-go-prio-packs/internal/protocol" 15 wire "github.com/danielpfeifer02/quic-go-prio-packs/internal/wire" 16 gomock "go.uber.org/mock/gomock" 17 ) 18 19 // MockCryptoStream is a mock of CryptoStream interface. 20 type MockCryptoStream struct { 21 ctrl *gomock.Controller 22 recorder *MockCryptoStreamMockRecorder 23 } 24 25 // MockCryptoStreamMockRecorder is the mock recorder for MockCryptoStream. 26 type MockCryptoStreamMockRecorder struct { 27 mock *MockCryptoStream 28 } 29 30 // NewMockCryptoStream creates a new mock instance. 31 func NewMockCryptoStream(ctrl *gomock.Controller) *MockCryptoStream { 32 mock := &MockCryptoStream{ctrl: ctrl} 33 mock.recorder = &MockCryptoStreamMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockCryptoStream) EXPECT() *MockCryptoStreamMockRecorder { 39 return m.recorder 40 } 41 42 // Finish mocks base method. 43 func (m *MockCryptoStream) Finish() error { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "Finish") 46 ret0, _ := ret[0].(error) 47 return ret0 48 } 49 50 // Finish indicates an expected call of Finish. 51 func (mr *MockCryptoStreamMockRecorder) Finish() *CryptoStreamFinishCall { 52 mr.mock.ctrl.T.Helper() 53 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finish", reflect.TypeOf((*MockCryptoStream)(nil).Finish)) 54 return &CryptoStreamFinishCall{Call: call} 55 } 56 57 // CryptoStreamFinishCall wrap *gomock.Call 58 type CryptoStreamFinishCall struct { 59 *gomock.Call 60 } 61 62 // Return rewrite *gomock.Call.Return 63 func (c *CryptoStreamFinishCall) Return(arg0 error) *CryptoStreamFinishCall { 64 c.Call = c.Call.Return(arg0) 65 return c 66 } 67 68 // Do rewrite *gomock.Call.Do 69 func (c *CryptoStreamFinishCall) Do(f func() error) *CryptoStreamFinishCall { 70 c.Call = c.Call.Do(f) 71 return c 72 } 73 74 // DoAndReturn rewrite *gomock.Call.DoAndReturn 75 func (c *CryptoStreamFinishCall) DoAndReturn(f func() error) *CryptoStreamFinishCall { 76 c.Call = c.Call.DoAndReturn(f) 77 return c 78 } 79 80 // GetCryptoData mocks base method. 81 func (m *MockCryptoStream) GetCryptoData() []byte { 82 m.ctrl.T.Helper() 83 ret := m.ctrl.Call(m, "GetCryptoData") 84 ret0, _ := ret[0].([]byte) 85 return ret0 86 } 87 88 // GetCryptoData indicates an expected call of GetCryptoData. 89 func (mr *MockCryptoStreamMockRecorder) GetCryptoData() *CryptoStreamGetCryptoDataCall { 90 mr.mock.ctrl.T.Helper() 91 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCryptoData", reflect.TypeOf((*MockCryptoStream)(nil).GetCryptoData)) 92 return &CryptoStreamGetCryptoDataCall{Call: call} 93 } 94 95 // CryptoStreamGetCryptoDataCall wrap *gomock.Call 96 type CryptoStreamGetCryptoDataCall struct { 97 *gomock.Call 98 } 99 100 // Return rewrite *gomock.Call.Return 101 func (c *CryptoStreamGetCryptoDataCall) Return(arg0 []byte) *CryptoStreamGetCryptoDataCall { 102 c.Call = c.Call.Return(arg0) 103 return c 104 } 105 106 // Do rewrite *gomock.Call.Do 107 func (c *CryptoStreamGetCryptoDataCall) Do(f func() []byte) *CryptoStreamGetCryptoDataCall { 108 c.Call = c.Call.Do(f) 109 return c 110 } 111 112 // DoAndReturn rewrite *gomock.Call.DoAndReturn 113 func (c *CryptoStreamGetCryptoDataCall) DoAndReturn(f func() []byte) *CryptoStreamGetCryptoDataCall { 114 c.Call = c.Call.DoAndReturn(f) 115 return c 116 } 117 118 // HandleCryptoFrame mocks base method. 119 func (m *MockCryptoStream) HandleCryptoFrame(arg0 *wire.CryptoFrame) error { 120 m.ctrl.T.Helper() 121 ret := m.ctrl.Call(m, "HandleCryptoFrame", arg0) 122 ret0, _ := ret[0].(error) 123 return ret0 124 } 125 126 // HandleCryptoFrame indicates an expected call of HandleCryptoFrame. 127 func (mr *MockCryptoStreamMockRecorder) HandleCryptoFrame(arg0 any) *CryptoStreamHandleCryptoFrameCall { 128 mr.mock.ctrl.T.Helper() 129 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleCryptoFrame", reflect.TypeOf((*MockCryptoStream)(nil).HandleCryptoFrame), arg0) 130 return &CryptoStreamHandleCryptoFrameCall{Call: call} 131 } 132 133 // CryptoStreamHandleCryptoFrameCall wrap *gomock.Call 134 type CryptoStreamHandleCryptoFrameCall struct { 135 *gomock.Call 136 } 137 138 // Return rewrite *gomock.Call.Return 139 func (c *CryptoStreamHandleCryptoFrameCall) Return(arg0 error) *CryptoStreamHandleCryptoFrameCall { 140 c.Call = c.Call.Return(arg0) 141 return c 142 } 143 144 // Do rewrite *gomock.Call.Do 145 func (c *CryptoStreamHandleCryptoFrameCall) Do(f func(*wire.CryptoFrame) error) *CryptoStreamHandleCryptoFrameCall { 146 c.Call = c.Call.Do(f) 147 return c 148 } 149 150 // DoAndReturn rewrite *gomock.Call.DoAndReturn 151 func (c *CryptoStreamHandleCryptoFrameCall) DoAndReturn(f func(*wire.CryptoFrame) error) *CryptoStreamHandleCryptoFrameCall { 152 c.Call = c.Call.DoAndReturn(f) 153 return c 154 } 155 156 // HasData mocks base method. 157 func (m *MockCryptoStream) HasData() bool { 158 m.ctrl.T.Helper() 159 ret := m.ctrl.Call(m, "HasData") 160 ret0, _ := ret[0].(bool) 161 return ret0 162 } 163 164 // HasData indicates an expected call of HasData. 165 func (mr *MockCryptoStreamMockRecorder) HasData() *CryptoStreamHasDataCall { 166 mr.mock.ctrl.T.Helper() 167 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasData", reflect.TypeOf((*MockCryptoStream)(nil).HasData)) 168 return &CryptoStreamHasDataCall{Call: call} 169 } 170 171 // CryptoStreamHasDataCall wrap *gomock.Call 172 type CryptoStreamHasDataCall struct { 173 *gomock.Call 174 } 175 176 // Return rewrite *gomock.Call.Return 177 func (c *CryptoStreamHasDataCall) Return(arg0 bool) *CryptoStreamHasDataCall { 178 c.Call = c.Call.Return(arg0) 179 return c 180 } 181 182 // Do rewrite *gomock.Call.Do 183 func (c *CryptoStreamHasDataCall) Do(f func() bool) *CryptoStreamHasDataCall { 184 c.Call = c.Call.Do(f) 185 return c 186 } 187 188 // DoAndReturn rewrite *gomock.Call.DoAndReturn 189 func (c *CryptoStreamHasDataCall) DoAndReturn(f func() bool) *CryptoStreamHasDataCall { 190 c.Call = c.Call.DoAndReturn(f) 191 return c 192 } 193 194 // PopCryptoFrame mocks base method. 195 func (m *MockCryptoStream) PopCryptoFrame(arg0 protocol.ByteCount) *wire.CryptoFrame { 196 m.ctrl.T.Helper() 197 ret := m.ctrl.Call(m, "PopCryptoFrame", arg0) 198 ret0, _ := ret[0].(*wire.CryptoFrame) 199 return ret0 200 } 201 202 // PopCryptoFrame indicates an expected call of PopCryptoFrame. 203 func (mr *MockCryptoStreamMockRecorder) PopCryptoFrame(arg0 any) *CryptoStreamPopCryptoFrameCall { 204 mr.mock.ctrl.T.Helper() 205 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopCryptoFrame", reflect.TypeOf((*MockCryptoStream)(nil).PopCryptoFrame), arg0) 206 return &CryptoStreamPopCryptoFrameCall{Call: call} 207 } 208 209 // CryptoStreamPopCryptoFrameCall wrap *gomock.Call 210 type CryptoStreamPopCryptoFrameCall struct { 211 *gomock.Call 212 } 213 214 // Return rewrite *gomock.Call.Return 215 func (c *CryptoStreamPopCryptoFrameCall) Return(arg0 *wire.CryptoFrame) *CryptoStreamPopCryptoFrameCall { 216 c.Call = c.Call.Return(arg0) 217 return c 218 } 219 220 // Do rewrite *gomock.Call.Do 221 func (c *CryptoStreamPopCryptoFrameCall) Do(f func(protocol.ByteCount) *wire.CryptoFrame) *CryptoStreamPopCryptoFrameCall { 222 c.Call = c.Call.Do(f) 223 return c 224 } 225 226 // DoAndReturn rewrite *gomock.Call.DoAndReturn 227 func (c *CryptoStreamPopCryptoFrameCall) DoAndReturn(f func(protocol.ByteCount) *wire.CryptoFrame) *CryptoStreamPopCryptoFrameCall { 228 c.Call = c.Call.DoAndReturn(f) 229 return c 230 } 231 232 // Write mocks base method. 233 func (m *MockCryptoStream) Write(arg0 []byte) (int, error) { 234 m.ctrl.T.Helper() 235 ret := m.ctrl.Call(m, "Write", arg0) 236 ret0, _ := ret[0].(int) 237 ret1, _ := ret[1].(error) 238 return ret0, ret1 239 } 240 241 // Write indicates an expected call of Write. 242 func (mr *MockCryptoStreamMockRecorder) Write(arg0 any) *CryptoStreamWriteCall { 243 mr.mock.ctrl.T.Helper() 244 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCryptoStream)(nil).Write), arg0) 245 return &CryptoStreamWriteCall{Call: call} 246 } 247 248 // CryptoStreamWriteCall wrap *gomock.Call 249 type CryptoStreamWriteCall struct { 250 *gomock.Call 251 } 252 253 // Return rewrite *gomock.Call.Return 254 func (c *CryptoStreamWriteCall) Return(arg0 int, arg1 error) *CryptoStreamWriteCall { 255 c.Call = c.Call.Return(arg0, arg1) 256 return c 257 } 258 259 // Do rewrite *gomock.Call.Do 260 func (c *CryptoStreamWriteCall) Do(f func([]byte) (int, error)) *CryptoStreamWriteCall { 261 c.Call = c.Call.Do(f) 262 return c 263 } 264 265 // DoAndReturn rewrite *gomock.Call.DoAndReturn 266 func (c *CryptoStreamWriteCall) DoAndReturn(f func([]byte) (int, error)) *CryptoStreamWriteCall { 267 c.Call = c.Call.DoAndReturn(f) 268 return c 269 }