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