github.com/quic-go/quic-go@v0.44.0/mock_packet_handler_manager_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/quic-go/quic-go (interfaces: PacketHandlerManager) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/quic-go/quic-go -destination mock_packet_handler_manager_test.go github.com/quic-go/quic-go PacketHandlerManager 7 // 8 9 // Package quic is a generated GoMock package. 10 package quic 11 12 import ( 13 reflect "reflect" 14 15 protocol "github.com/quic-go/quic-go/internal/protocol" 16 gomock "go.uber.org/mock/gomock" 17 ) 18 19 // MockPacketHandlerManager is a mock of PacketHandlerManager interface. 20 type MockPacketHandlerManager struct { 21 ctrl *gomock.Controller 22 recorder *MockPacketHandlerManagerMockRecorder 23 } 24 25 // MockPacketHandlerManagerMockRecorder is the mock recorder for MockPacketHandlerManager. 26 type MockPacketHandlerManagerMockRecorder struct { 27 mock *MockPacketHandlerManager 28 } 29 30 // NewMockPacketHandlerManager creates a new mock instance. 31 func NewMockPacketHandlerManager(ctrl *gomock.Controller) *MockPacketHandlerManager { 32 mock := &MockPacketHandlerManager{ctrl: ctrl} 33 mock.recorder = &MockPacketHandlerManagerMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockPacketHandlerManager) EXPECT() *MockPacketHandlerManagerMockRecorder { 39 return m.recorder 40 } 41 42 // Add mocks base method. 43 func (m *MockPacketHandlerManager) Add(arg0 protocol.ConnectionID, arg1 packetHandler) bool { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "Add", arg0, arg1) 46 ret0, _ := ret[0].(bool) 47 return ret0 48 } 49 50 // Add indicates an expected call of Add. 51 func (mr *MockPacketHandlerManagerMockRecorder) Add(arg0, arg1 any) *MockPacketHandlerManagerAddCall { 52 mr.mock.ctrl.T.Helper() 53 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockPacketHandlerManager)(nil).Add), arg0, arg1) 54 return &MockPacketHandlerManagerAddCall{Call: call} 55 } 56 57 // MockPacketHandlerManagerAddCall wrap *gomock.Call 58 type MockPacketHandlerManagerAddCall struct { 59 *gomock.Call 60 } 61 62 // Return rewrite *gomock.Call.Return 63 func (c *MockPacketHandlerManagerAddCall) Return(arg0 bool) *MockPacketHandlerManagerAddCall { 64 c.Call = c.Call.Return(arg0) 65 return c 66 } 67 68 // Do rewrite *gomock.Call.Do 69 func (c *MockPacketHandlerManagerAddCall) Do(f func(protocol.ConnectionID, packetHandler) bool) *MockPacketHandlerManagerAddCall { 70 c.Call = c.Call.Do(f) 71 return c 72 } 73 74 // DoAndReturn rewrite *gomock.Call.DoAndReturn 75 func (c *MockPacketHandlerManagerAddCall) DoAndReturn(f func(protocol.ConnectionID, packetHandler) bool) *MockPacketHandlerManagerAddCall { 76 c.Call = c.Call.DoAndReturn(f) 77 return c 78 } 79 80 // AddResetToken mocks base method. 81 func (m *MockPacketHandlerManager) AddResetToken(arg0 protocol.StatelessResetToken, arg1 packetHandler) { 82 m.ctrl.T.Helper() 83 m.ctrl.Call(m, "AddResetToken", arg0, arg1) 84 } 85 86 // AddResetToken indicates an expected call of AddResetToken. 87 func (mr *MockPacketHandlerManagerMockRecorder) AddResetToken(arg0, arg1 any) *MockPacketHandlerManagerAddResetTokenCall { 88 mr.mock.ctrl.T.Helper() 89 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddResetToken", reflect.TypeOf((*MockPacketHandlerManager)(nil).AddResetToken), arg0, arg1) 90 return &MockPacketHandlerManagerAddResetTokenCall{Call: call} 91 } 92 93 // MockPacketHandlerManagerAddResetTokenCall wrap *gomock.Call 94 type MockPacketHandlerManagerAddResetTokenCall struct { 95 *gomock.Call 96 } 97 98 // Return rewrite *gomock.Call.Return 99 func (c *MockPacketHandlerManagerAddResetTokenCall) Return() *MockPacketHandlerManagerAddResetTokenCall { 100 c.Call = c.Call.Return() 101 return c 102 } 103 104 // Do rewrite *gomock.Call.Do 105 func (c *MockPacketHandlerManagerAddResetTokenCall) Do(f func(protocol.StatelessResetToken, packetHandler)) *MockPacketHandlerManagerAddResetTokenCall { 106 c.Call = c.Call.Do(f) 107 return c 108 } 109 110 // DoAndReturn rewrite *gomock.Call.DoAndReturn 111 func (c *MockPacketHandlerManagerAddResetTokenCall) DoAndReturn(f func(protocol.StatelessResetToken, packetHandler)) *MockPacketHandlerManagerAddResetTokenCall { 112 c.Call = c.Call.DoAndReturn(f) 113 return c 114 } 115 116 // AddWithConnID mocks base method. 117 func (m *MockPacketHandlerManager) AddWithConnID(arg0, arg1 protocol.ConnectionID, arg2 packetHandler) bool { 118 m.ctrl.T.Helper() 119 ret := m.ctrl.Call(m, "AddWithConnID", arg0, arg1, arg2) 120 ret0, _ := ret[0].(bool) 121 return ret0 122 } 123 124 // AddWithConnID indicates an expected call of AddWithConnID. 125 func (mr *MockPacketHandlerManagerMockRecorder) AddWithConnID(arg0, arg1, arg2 any) *MockPacketHandlerManagerAddWithConnIDCall { 126 mr.mock.ctrl.T.Helper() 127 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddWithConnID", reflect.TypeOf((*MockPacketHandlerManager)(nil).AddWithConnID), arg0, arg1, arg2) 128 return &MockPacketHandlerManagerAddWithConnIDCall{Call: call} 129 } 130 131 // MockPacketHandlerManagerAddWithConnIDCall wrap *gomock.Call 132 type MockPacketHandlerManagerAddWithConnIDCall struct { 133 *gomock.Call 134 } 135 136 // Return rewrite *gomock.Call.Return 137 func (c *MockPacketHandlerManagerAddWithConnIDCall) Return(arg0 bool) *MockPacketHandlerManagerAddWithConnIDCall { 138 c.Call = c.Call.Return(arg0) 139 return c 140 } 141 142 // Do rewrite *gomock.Call.Do 143 func (c *MockPacketHandlerManagerAddWithConnIDCall) Do(f func(protocol.ConnectionID, protocol.ConnectionID, packetHandler) bool) *MockPacketHandlerManagerAddWithConnIDCall { 144 c.Call = c.Call.Do(f) 145 return c 146 } 147 148 // DoAndReturn rewrite *gomock.Call.DoAndReturn 149 func (c *MockPacketHandlerManagerAddWithConnIDCall) DoAndReturn(f func(protocol.ConnectionID, protocol.ConnectionID, packetHandler) bool) *MockPacketHandlerManagerAddWithConnIDCall { 150 c.Call = c.Call.DoAndReturn(f) 151 return c 152 } 153 154 // Close mocks base method. 155 func (m *MockPacketHandlerManager) Close(arg0 error) { 156 m.ctrl.T.Helper() 157 m.ctrl.Call(m, "Close", arg0) 158 } 159 160 // Close indicates an expected call of Close. 161 func (mr *MockPacketHandlerManagerMockRecorder) Close(arg0 any) *MockPacketHandlerManagerCloseCall { 162 mr.mock.ctrl.T.Helper() 163 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPacketHandlerManager)(nil).Close), arg0) 164 return &MockPacketHandlerManagerCloseCall{Call: call} 165 } 166 167 // MockPacketHandlerManagerCloseCall wrap *gomock.Call 168 type MockPacketHandlerManagerCloseCall struct { 169 *gomock.Call 170 } 171 172 // Return rewrite *gomock.Call.Return 173 func (c *MockPacketHandlerManagerCloseCall) Return() *MockPacketHandlerManagerCloseCall { 174 c.Call = c.Call.Return() 175 return c 176 } 177 178 // Do rewrite *gomock.Call.Do 179 func (c *MockPacketHandlerManagerCloseCall) Do(f func(error)) *MockPacketHandlerManagerCloseCall { 180 c.Call = c.Call.Do(f) 181 return c 182 } 183 184 // DoAndReturn rewrite *gomock.Call.DoAndReturn 185 func (c *MockPacketHandlerManagerCloseCall) DoAndReturn(f func(error)) *MockPacketHandlerManagerCloseCall { 186 c.Call = c.Call.DoAndReturn(f) 187 return c 188 } 189 190 // Get mocks base method. 191 func (m *MockPacketHandlerManager) Get(arg0 protocol.ConnectionID) (packetHandler, bool) { 192 m.ctrl.T.Helper() 193 ret := m.ctrl.Call(m, "Get", arg0) 194 ret0, _ := ret[0].(packetHandler) 195 ret1, _ := ret[1].(bool) 196 return ret0, ret1 197 } 198 199 // Get indicates an expected call of Get. 200 func (mr *MockPacketHandlerManagerMockRecorder) Get(arg0 any) *MockPacketHandlerManagerGetCall { 201 mr.mock.ctrl.T.Helper() 202 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPacketHandlerManager)(nil).Get), arg0) 203 return &MockPacketHandlerManagerGetCall{Call: call} 204 } 205 206 // MockPacketHandlerManagerGetCall wrap *gomock.Call 207 type MockPacketHandlerManagerGetCall struct { 208 *gomock.Call 209 } 210 211 // Return rewrite *gomock.Call.Return 212 func (c *MockPacketHandlerManagerGetCall) Return(arg0 packetHandler, arg1 bool) *MockPacketHandlerManagerGetCall { 213 c.Call = c.Call.Return(arg0, arg1) 214 return c 215 } 216 217 // Do rewrite *gomock.Call.Do 218 func (c *MockPacketHandlerManagerGetCall) Do(f func(protocol.ConnectionID) (packetHandler, bool)) *MockPacketHandlerManagerGetCall { 219 c.Call = c.Call.Do(f) 220 return c 221 } 222 223 // DoAndReturn rewrite *gomock.Call.DoAndReturn 224 func (c *MockPacketHandlerManagerGetCall) DoAndReturn(f func(protocol.ConnectionID) (packetHandler, bool)) *MockPacketHandlerManagerGetCall { 225 c.Call = c.Call.DoAndReturn(f) 226 return c 227 } 228 229 // GetByResetToken mocks base method. 230 func (m *MockPacketHandlerManager) GetByResetToken(arg0 protocol.StatelessResetToken) (packetHandler, bool) { 231 m.ctrl.T.Helper() 232 ret := m.ctrl.Call(m, "GetByResetToken", arg0) 233 ret0, _ := ret[0].(packetHandler) 234 ret1, _ := ret[1].(bool) 235 return ret0, ret1 236 } 237 238 // GetByResetToken indicates an expected call of GetByResetToken. 239 func (mr *MockPacketHandlerManagerMockRecorder) GetByResetToken(arg0 any) *MockPacketHandlerManagerGetByResetTokenCall { 240 mr.mock.ctrl.T.Helper() 241 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByResetToken", reflect.TypeOf((*MockPacketHandlerManager)(nil).GetByResetToken), arg0) 242 return &MockPacketHandlerManagerGetByResetTokenCall{Call: call} 243 } 244 245 // MockPacketHandlerManagerGetByResetTokenCall wrap *gomock.Call 246 type MockPacketHandlerManagerGetByResetTokenCall struct { 247 *gomock.Call 248 } 249 250 // Return rewrite *gomock.Call.Return 251 func (c *MockPacketHandlerManagerGetByResetTokenCall) Return(arg0 packetHandler, arg1 bool) *MockPacketHandlerManagerGetByResetTokenCall { 252 c.Call = c.Call.Return(arg0, arg1) 253 return c 254 } 255 256 // Do rewrite *gomock.Call.Do 257 func (c *MockPacketHandlerManagerGetByResetTokenCall) Do(f func(protocol.StatelessResetToken) (packetHandler, bool)) *MockPacketHandlerManagerGetByResetTokenCall { 258 c.Call = c.Call.Do(f) 259 return c 260 } 261 262 // DoAndReturn rewrite *gomock.Call.DoAndReturn 263 func (c *MockPacketHandlerManagerGetByResetTokenCall) DoAndReturn(f func(protocol.StatelessResetToken) (packetHandler, bool)) *MockPacketHandlerManagerGetByResetTokenCall { 264 c.Call = c.Call.DoAndReturn(f) 265 return c 266 } 267 268 // GetStatelessResetToken mocks base method. 269 func (m *MockPacketHandlerManager) GetStatelessResetToken(arg0 protocol.ConnectionID) protocol.StatelessResetToken { 270 m.ctrl.T.Helper() 271 ret := m.ctrl.Call(m, "GetStatelessResetToken", arg0) 272 ret0, _ := ret[0].(protocol.StatelessResetToken) 273 return ret0 274 } 275 276 // GetStatelessResetToken indicates an expected call of GetStatelessResetToken. 277 func (mr *MockPacketHandlerManagerMockRecorder) GetStatelessResetToken(arg0 any) *MockPacketHandlerManagerGetStatelessResetTokenCall { 278 mr.mock.ctrl.T.Helper() 279 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStatelessResetToken", reflect.TypeOf((*MockPacketHandlerManager)(nil).GetStatelessResetToken), arg0) 280 return &MockPacketHandlerManagerGetStatelessResetTokenCall{Call: call} 281 } 282 283 // MockPacketHandlerManagerGetStatelessResetTokenCall wrap *gomock.Call 284 type MockPacketHandlerManagerGetStatelessResetTokenCall struct { 285 *gomock.Call 286 } 287 288 // Return rewrite *gomock.Call.Return 289 func (c *MockPacketHandlerManagerGetStatelessResetTokenCall) Return(arg0 protocol.StatelessResetToken) *MockPacketHandlerManagerGetStatelessResetTokenCall { 290 c.Call = c.Call.Return(arg0) 291 return c 292 } 293 294 // Do rewrite *gomock.Call.Do 295 func (c *MockPacketHandlerManagerGetStatelessResetTokenCall) Do(f func(protocol.ConnectionID) protocol.StatelessResetToken) *MockPacketHandlerManagerGetStatelessResetTokenCall { 296 c.Call = c.Call.Do(f) 297 return c 298 } 299 300 // DoAndReturn rewrite *gomock.Call.DoAndReturn 301 func (c *MockPacketHandlerManagerGetStatelessResetTokenCall) DoAndReturn(f func(protocol.ConnectionID) protocol.StatelessResetToken) *MockPacketHandlerManagerGetStatelessResetTokenCall { 302 c.Call = c.Call.DoAndReturn(f) 303 return c 304 } 305 306 // Remove mocks base method. 307 func (m *MockPacketHandlerManager) Remove(arg0 protocol.ConnectionID) { 308 m.ctrl.T.Helper() 309 m.ctrl.Call(m, "Remove", arg0) 310 } 311 312 // Remove indicates an expected call of Remove. 313 func (mr *MockPacketHandlerManagerMockRecorder) Remove(arg0 any) *MockPacketHandlerManagerRemoveCall { 314 mr.mock.ctrl.T.Helper() 315 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockPacketHandlerManager)(nil).Remove), arg0) 316 return &MockPacketHandlerManagerRemoveCall{Call: call} 317 } 318 319 // MockPacketHandlerManagerRemoveCall wrap *gomock.Call 320 type MockPacketHandlerManagerRemoveCall struct { 321 *gomock.Call 322 } 323 324 // Return rewrite *gomock.Call.Return 325 func (c *MockPacketHandlerManagerRemoveCall) Return() *MockPacketHandlerManagerRemoveCall { 326 c.Call = c.Call.Return() 327 return c 328 } 329 330 // Do rewrite *gomock.Call.Do 331 func (c *MockPacketHandlerManagerRemoveCall) Do(f func(protocol.ConnectionID)) *MockPacketHandlerManagerRemoveCall { 332 c.Call = c.Call.Do(f) 333 return c 334 } 335 336 // DoAndReturn rewrite *gomock.Call.DoAndReturn 337 func (c *MockPacketHandlerManagerRemoveCall) DoAndReturn(f func(protocol.ConnectionID)) *MockPacketHandlerManagerRemoveCall { 338 c.Call = c.Call.DoAndReturn(f) 339 return c 340 } 341 342 // RemoveResetToken mocks base method. 343 func (m *MockPacketHandlerManager) RemoveResetToken(arg0 protocol.StatelessResetToken) { 344 m.ctrl.T.Helper() 345 m.ctrl.Call(m, "RemoveResetToken", arg0) 346 } 347 348 // RemoveResetToken indicates an expected call of RemoveResetToken. 349 func (mr *MockPacketHandlerManagerMockRecorder) RemoveResetToken(arg0 any) *MockPacketHandlerManagerRemoveResetTokenCall { 350 mr.mock.ctrl.T.Helper() 351 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveResetToken", reflect.TypeOf((*MockPacketHandlerManager)(nil).RemoveResetToken), arg0) 352 return &MockPacketHandlerManagerRemoveResetTokenCall{Call: call} 353 } 354 355 // MockPacketHandlerManagerRemoveResetTokenCall wrap *gomock.Call 356 type MockPacketHandlerManagerRemoveResetTokenCall struct { 357 *gomock.Call 358 } 359 360 // Return rewrite *gomock.Call.Return 361 func (c *MockPacketHandlerManagerRemoveResetTokenCall) Return() *MockPacketHandlerManagerRemoveResetTokenCall { 362 c.Call = c.Call.Return() 363 return c 364 } 365 366 // Do rewrite *gomock.Call.Do 367 func (c *MockPacketHandlerManagerRemoveResetTokenCall) Do(f func(protocol.StatelessResetToken)) *MockPacketHandlerManagerRemoveResetTokenCall { 368 c.Call = c.Call.Do(f) 369 return c 370 } 371 372 // DoAndReturn rewrite *gomock.Call.DoAndReturn 373 func (c *MockPacketHandlerManagerRemoveResetTokenCall) DoAndReturn(f func(protocol.StatelessResetToken)) *MockPacketHandlerManagerRemoveResetTokenCall { 374 c.Call = c.Call.DoAndReturn(f) 375 return c 376 } 377 378 // ReplaceWithClosed mocks base method. 379 func (m *MockPacketHandlerManager) ReplaceWithClosed(arg0 []protocol.ConnectionID, arg1 []byte) { 380 m.ctrl.T.Helper() 381 m.ctrl.Call(m, "ReplaceWithClosed", arg0, arg1) 382 } 383 384 // ReplaceWithClosed indicates an expected call of ReplaceWithClosed. 385 func (mr *MockPacketHandlerManagerMockRecorder) ReplaceWithClosed(arg0, arg1 any) *MockPacketHandlerManagerReplaceWithClosedCall { 386 mr.mock.ctrl.T.Helper() 387 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceWithClosed", reflect.TypeOf((*MockPacketHandlerManager)(nil).ReplaceWithClosed), arg0, arg1) 388 return &MockPacketHandlerManagerReplaceWithClosedCall{Call: call} 389 } 390 391 // MockPacketHandlerManagerReplaceWithClosedCall wrap *gomock.Call 392 type MockPacketHandlerManagerReplaceWithClosedCall struct { 393 *gomock.Call 394 } 395 396 // Return rewrite *gomock.Call.Return 397 func (c *MockPacketHandlerManagerReplaceWithClosedCall) Return() *MockPacketHandlerManagerReplaceWithClosedCall { 398 c.Call = c.Call.Return() 399 return c 400 } 401 402 // Do rewrite *gomock.Call.Do 403 func (c *MockPacketHandlerManagerReplaceWithClosedCall) Do(f func([]protocol.ConnectionID, []byte)) *MockPacketHandlerManagerReplaceWithClosedCall { 404 c.Call = c.Call.Do(f) 405 return c 406 } 407 408 // DoAndReturn rewrite *gomock.Call.DoAndReturn 409 func (c *MockPacketHandlerManagerReplaceWithClosedCall) DoAndReturn(f func([]protocol.ConnectionID, []byte)) *MockPacketHandlerManagerReplaceWithClosedCall { 410 c.Call = c.Call.DoAndReturn(f) 411 return c 412 } 413 414 // Retire mocks base method. 415 func (m *MockPacketHandlerManager) Retire(arg0 protocol.ConnectionID) { 416 m.ctrl.T.Helper() 417 m.ctrl.Call(m, "Retire", arg0) 418 } 419 420 // Retire indicates an expected call of Retire. 421 func (mr *MockPacketHandlerManagerMockRecorder) Retire(arg0 any) *MockPacketHandlerManagerRetireCall { 422 mr.mock.ctrl.T.Helper() 423 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Retire", reflect.TypeOf((*MockPacketHandlerManager)(nil).Retire), arg0) 424 return &MockPacketHandlerManagerRetireCall{Call: call} 425 } 426 427 // MockPacketHandlerManagerRetireCall wrap *gomock.Call 428 type MockPacketHandlerManagerRetireCall struct { 429 *gomock.Call 430 } 431 432 // Return rewrite *gomock.Call.Return 433 func (c *MockPacketHandlerManagerRetireCall) Return() *MockPacketHandlerManagerRetireCall { 434 c.Call = c.Call.Return() 435 return c 436 } 437 438 // Do rewrite *gomock.Call.Do 439 func (c *MockPacketHandlerManagerRetireCall) Do(f func(protocol.ConnectionID)) *MockPacketHandlerManagerRetireCall { 440 c.Call = c.Call.Do(f) 441 return c 442 } 443 444 // DoAndReturn rewrite *gomock.Call.DoAndReturn 445 func (c *MockPacketHandlerManagerRetireCall) DoAndReturn(f func(protocol.ConnectionID)) *MockPacketHandlerManagerRetireCall { 446 c.Call = c.Call.DoAndReturn(f) 447 return c 448 }