Debian Codegraph @

jsonutils/adapters/ifaces/mocks/mocks.go

raw
1 // SPDX-FileCopyrightText: Copyright 2015-2025 go-swagger maintainers
2 // SPDX-License-Identifier: Apache-2.0
3
4 // Code generated by mockery; DO NOT EDIT.
5 // github.com/vektra/mockery
6 // template: matryer
7
8 package mocks
9
10 import (
11 "iter"
12 "sync"
13
14 "github.com/go-openapi/swag/jsonutils/adapters/ifaces"
15 )
16
17 // Ensure that MockOrdered does implement ifaces.Ordered.
18 // If this is not the case, regenerate this file with mockery.
19 var _ ifaces.Ordered = &MockOrdered{}
20
21 // MockOrdered is a mock implementation of ifaces.Ordered.
22 //
23 // func TestSomethingThatUsesOrdered(t *testing.T) {
24 //
25 // // make and configure a mocked ifaces.Ordered
26 // mockedOrdered := &MockOrdered{
27 // OrderedItemsFunc: func() iter.Seq2[string, any] {
28 // panic("mock out the OrderedItems method")
29 // },
30 // }
31 //
32 // // use mockedOrdered in code that requires ifaces.Ordered
33 // // and then make assertions.
34 //
35 // }
36 type MockOrdered struct {
37 // OrderedItemsFunc mocks the OrderedItems method.
38 OrderedItemsFunc func() iter.Seq2[string, any]
39
40 // calls tracks calls to the methods.
41 calls struct {
42 // OrderedItems holds details about calls to the OrderedItems method.
43 OrderedItems []struct {
44 }
45 }
46 lockOrderedItems sync.RWMutex
47 }
48
49 // OrderedItems calls OrderedItemsFunc.
50 func (mock *MockOrdered) OrderedItems() iter.Seq2[string, any] {
51 if mock.OrderedItemsFunc == nil {
52 panic("MockOrdered.OrderedItemsFunc: method is nil but Ordered.OrderedItems was just called")
53 }
54 callInfo := struct {
55 }{}
56 mock.lockOrderedItems.Lock()
57 mock.calls.OrderedItems = append(mock.calls.OrderedItems, callInfo)
58 mock.lockOrderedItems.Unlock()
59 return mock.OrderedItemsFunc()
60 }
61
62 // OrderedItemsCalls gets all the calls that were made to OrderedItems.
63 // Check the length with:
64 //
65 // len(mockedOrdered.OrderedItemsCalls())
66 func (mock *MockOrdered) OrderedItemsCalls() []struct {
67 } {
68 var calls []struct {
69 }
70 mock.lockOrderedItems.RLock()
71 calls = mock.calls.OrderedItems
72 mock.lockOrderedItems.RUnlock()
73 return calls
74 }
75
76 // Ensure that MockSetOrdered does implement ifaces.SetOrdered.
77 // If this is not the case, regenerate this file with mockery.
78 var _ ifaces.SetOrdered = &MockSetOrdered{}
79
80 // MockSetOrdered is a mock implementation of ifaces.SetOrdered.
81 //
82 // func TestSomethingThatUsesSetOrdered(t *testing.T) {
83 //
84 // // make and configure a mocked ifaces.SetOrdered
85 // mockedSetOrdered := &MockSetOrdered{
86 // SetOrderedItemsFunc: func(seq2 iter.Seq2[string, any]) {
87 // panic("mock out the SetOrderedItems method")
88 // },
89 // }
90 //
91 // // use mockedSetOrdered in code that requires ifaces.SetOrdered
92 // // and then make assertions.
93 //
94 // }
95 type MockSetOrdered struct {
96 // SetOrderedItemsFunc mocks the SetOrderedItems method.
97 SetOrderedItemsFunc func(seq2 iter.Seq2[string, any])
98
99 // calls tracks calls to the methods.
100 calls struct {
101 // SetOrderedItems holds details about calls to the SetOrderedItems method.
102 SetOrderedItems []struct {
103 // Seq2 is the seq2 argument value.
104 Seq2 iter.Seq2[string, any]
105 }
106 }
107 lockSetOrderedItems sync.RWMutex
108 }
109
110 // SetOrderedItems calls SetOrderedItemsFunc.
111 func (mock *MockSetOrdered) SetOrderedItems(seq2 iter.Seq2[string, any]) {
112 if mock.SetOrderedItemsFunc == nil {
113 panic("MockSetOrdered.SetOrderedItemsFunc: method is nil but SetOrdered.SetOrderedItems was just called")
114 }
115 callInfo := struct {
116 Seq2 iter.Seq2[string, any]
117 }{
118 Seq2: seq2,
119 }
120 mock.lockSetOrderedItems.Lock()
121 mock.calls.SetOrderedItems = append(mock.calls.SetOrderedItems, callInfo)
122 mock.lockSetOrderedItems.Unlock()
123 mock.SetOrderedItemsFunc(seq2)
124 }
125
126 // SetOrderedItemsCalls gets all the calls that were made to SetOrderedItems.
127 // Check the length with:
128 //
129 // len(mockedSetOrdered.SetOrderedItemsCalls())
130 func (mock *MockSetOrdered) SetOrderedItemsCalls() []struct {
131 Seq2 iter.Seq2[string, any]
132 } {
133 var calls []struct {
134 Seq2 iter.Seq2[string, any]
135 }
136 mock.lockSetOrderedItems.RLock()
137 calls = mock.calls.SetOrderedItems
138 mock.lockSetOrderedItems.RUnlock()
139 return calls
140 }
141
142 // Ensure that MockOrderedMap does implement ifaces.OrderedMap.
143 // If this is not the case, regenerate this file with mockery.
144 var _ ifaces.OrderedMap = &MockOrderedMap{}
145
146 // MockOrderedMap is a mock implementation of ifaces.OrderedMap.
147 //
148 // func TestSomethingThatUsesOrderedMap(t *testing.T) {
149 //
150 // // make and configure a mocked ifaces.OrderedMap
151 // mockedOrderedMap := &MockOrderedMap{
152 // OrderedItemsFunc: func() iter.Seq2[string, any] {
153 // panic("mock out the OrderedItems method")
154 // },
155 // OrderedMarshalJSONFunc: func() ([]byte, error) {
156 // panic("mock out the OrderedMarshalJSON method")
157 // },
158 // OrderedUnmarshalJSONFunc: func(bytes []byte) error {
159 // panic("mock out the OrderedUnmarshalJSON method")
160 // },
161 // SetOrderedItemsFunc: func(seq2 iter.Seq2[string, any]) {
162 // panic("mock out the SetOrderedItems method")
163 // },
164 // }
165 //
166 // // use mockedOrderedMap in code that requires ifaces.OrderedMap
167 // // and then make assertions.
168 //
169 // }
170 type MockOrderedMap struct {
171 // OrderedItemsFunc mocks the OrderedItems method.
172 OrderedItemsFunc func() iter.Seq2[string, any]
173
174 // OrderedMarshalJSONFunc mocks the OrderedMarshalJSON method.
175 OrderedMarshalJSONFunc func() ([]byte, error)
176
177 // OrderedUnmarshalJSONFunc mocks the OrderedUnmarshalJSON method.
178 OrderedUnmarshalJSONFunc func(bytes []byte) error
179
180 // SetOrderedItemsFunc mocks the SetOrderedItems method.
181 SetOrderedItemsFunc func(seq2 iter.Seq2[string, any])
182
183 // calls tracks calls to the methods.
184 calls struct {
185 // OrderedItems holds details about calls to the OrderedItems method.
186 OrderedItems []struct {
187 }
188 // OrderedMarshalJSON holds details about calls to the OrderedMarshalJSON method.
189 OrderedMarshalJSON []struct {
190 }
191 // OrderedUnmarshalJSON holds details about calls to the OrderedUnmarshalJSON method.
192 OrderedUnmarshalJSON []struct {
193 // Bytes is the bytes argument value.
194 Bytes []byte
195 }
196 // SetOrderedItems holds details about calls to the SetOrderedItems method.
197 SetOrderedItems []struct {
198 // Seq2 is the seq2 argument value.
199 Seq2 iter.Seq2[string, any]
200 }
201 }
202 lockOrderedItems sync.RWMutex
203 lockOrderedMarshalJSON sync.RWMutex
204 lockOrderedUnmarshalJSON sync.RWMutex
205 lockSetOrderedItems sync.RWMutex
206 }
207
208 // OrderedItems calls OrderedItemsFunc.
209 func (mock *MockOrderedMap) OrderedItems() iter.Seq2[string, any] {
210 if mock.OrderedItemsFunc == nil {
211 panic("MockOrderedMap.OrderedItemsFunc: method is nil but OrderedMap.OrderedItems was just called")
212 }
213 callInfo := struct {
214 }{}
215 mock.lockOrderedItems.Lock()
216 mock.calls.OrderedItems = append(mock.calls.OrderedItems, callInfo)
217 mock.lockOrderedItems.Unlock()
218 return mock.OrderedItemsFunc()
219 }
220
221 // OrderedItemsCalls gets all the calls that were made to OrderedItems.
222 // Check the length with:
223 //
224 // len(mockedOrderedMap.OrderedItemsCalls())
225 func (mock *MockOrderedMap) OrderedItemsCalls() []struct {
226 } {
227 var calls []struct {
228 }
229 mock.lockOrderedItems.RLock()
230 calls = mock.calls.OrderedItems
231 mock.lockOrderedItems.RUnlock()
232 return calls
233 }
234
235 // OrderedMarshalJSON calls OrderedMarshalJSONFunc.
236 func (mock *MockOrderedMap) OrderedMarshalJSON() ([]byte, error) {
237 if mock.OrderedMarshalJSONFunc == nil {
238 panic("MockOrderedMap.OrderedMarshalJSONFunc: method is nil but OrderedMap.OrderedMarshalJSON was just called")
239 }
240 callInfo := struct {
241 }{}
242 mock.lockOrderedMarshalJSON.Lock()
243 mock.calls.OrderedMarshalJSON = append(mock.calls.OrderedMarshalJSON, callInfo)
244 mock.lockOrderedMarshalJSON.Unlock()
245 return mock.OrderedMarshalJSONFunc()
246 }
247
248 // OrderedMarshalJSONCalls gets all the calls that were made to OrderedMarshalJSON.
249 // Check the length with:
250 //
251 // len(mockedOrderedMap.OrderedMarshalJSONCalls())
252 func (mock *MockOrderedMap) OrderedMarshalJSONCalls() []struct {
253 } {
254 var calls []struct {
255 }
256 mock.lockOrderedMarshalJSON.RLock()
257 calls = mock.calls.OrderedMarshalJSON
258 mock.lockOrderedMarshalJSON.RUnlock()
259 return calls
260 }
261
262 // OrderedUnmarshalJSON calls OrderedUnmarshalJSONFunc.
263 func (mock *MockOrderedMap) OrderedUnmarshalJSON(bytes []byte) error {
264 if mock.OrderedUnmarshalJSONFunc == nil {
265 panic("MockOrderedMap.OrderedUnmarshalJSONFunc: method is nil but OrderedMap.OrderedUnmarshalJSON was just called")
266 }
267 callInfo := struct {
268 Bytes []byte
269 }{
270 Bytes: bytes,
271 }
272 mock.lockOrderedUnmarshalJSON.Lock()
273 mock.calls.OrderedUnmarshalJSON = append(mock.calls.OrderedUnmarshalJSON, callInfo)
274 mock.lockOrderedUnmarshalJSON.Unlock()
275 return mock.OrderedUnmarshalJSONFunc(bytes)
276 }
277
278 // OrderedUnmarshalJSONCalls gets all the calls that were made to OrderedUnmarshalJSON.
279 // Check the length with:
280 //
281 // len(mockedOrderedMap.OrderedUnmarshalJSONCalls())
282 func (mock *MockOrderedMap) OrderedUnmarshalJSONCalls() []struct {
283 Bytes []byte
284 } {
285 var calls []struct {
286 Bytes []byte
287 }
288 mock.lockOrderedUnmarshalJSON.RLock()
289 calls = mock.calls.OrderedUnmarshalJSON
290 mock.lockOrderedUnmarshalJSON.RUnlock()
291 return calls
292 }
293
294 // SetOrderedItems calls SetOrderedItemsFunc.
295 func (mock *MockOrderedMap) SetOrderedItems(seq2 iter.Seq2[string, any]) {
296 if mock.SetOrderedItemsFunc == nil {
297 panic("MockOrderedMap.SetOrderedItemsFunc: method is nil but OrderedMap.SetOrderedItems was just called")
298 }
299 callInfo := struct {
300 Seq2 iter.Seq2[string, any]
301 }{
302 Seq2: seq2,
303 }
304 mock.lockSetOrderedItems.Lock()
305 mock.calls.SetOrderedItems = append(mock.calls.SetOrderedItems, callInfo)
306 mock.lockSetOrderedItems.Unlock()
307 mock.SetOrderedItemsFunc(seq2)
308 }
309
310 // SetOrderedItemsCalls gets all the calls that were made to SetOrderedItems.
311 // Check the length with:
312 //
313 // len(mockedOrderedMap.SetOrderedItemsCalls())
314 func (mock *MockOrderedMap) SetOrderedItemsCalls() []struct {
315 Seq2 iter.Seq2[string, any]
316 } {
317 var calls []struct {
318 Seq2 iter.Seq2[string, any]
319 }
320 mock.lockSetOrderedItems.RLock()
321 calls = mock.calls.SetOrderedItems
322 mock.lockSetOrderedItems.RUnlock()
323 return calls
324 }
325
326 // Ensure that MockMarshalAdapter does implement ifaces.MarshalAdapter.
327 // If this is not the case, regenerate this file with mockery.
328 var _ ifaces.MarshalAdapter = &MockMarshalAdapter{}
329
330 // MockMarshalAdapter is a mock implementation of ifaces.MarshalAdapter.
331 //
332 // func TestSomethingThatUsesMarshalAdapter(t *testing.T) {
333 //
334 // // make and configure a mocked ifaces.MarshalAdapter
335 // mockedMarshalAdapter := &MockMarshalAdapter{
336 // MarshalFunc: func(v any) ([]byte, error) {
337 // panic("mock out the Marshal method")
338 // },
339 // RedeemFunc: func() {
340 // panic("mock out the Redeem method")
341 // },
342 // ResetFunc: func() {
343 // panic("mock out the Reset method")
344 // },
345 // }
346 //
347 // // use mockedMarshalAdapter in code that requires ifaces.MarshalAdapter
348 // // and then make assertions.
349 //
350 // }
351 type MockMarshalAdapter struct {
352 // MarshalFunc mocks the Marshal method.
353 MarshalFunc func(v any) ([]byte, error)
354
355 // RedeemFunc mocks the Redeem method.
356 RedeemFunc func()
357
358 // ResetFunc mocks the Reset method.
359 ResetFunc func()
360
361 // calls tracks calls to the methods.
362 calls struct {
363 // Marshal holds details about calls to the Marshal method.
364 Marshal []struct {
365 // V is the v argument value.
366 V any
367 }
368 // Redeem holds details about calls to the Redeem method.
369 Redeem []struct {
370 }
371 // Reset holds details about calls to the Reset method.
372 Reset []struct {
373 }
374 }
375 lockMarshal sync.RWMutex
376 lockRedeem sync.RWMutex
377 lockReset sync.RWMutex
378 }
379
380 // Marshal calls MarshalFunc.
381 func (mock *MockMarshalAdapter) Marshal(v any) ([]byte, error) {
382 if mock.MarshalFunc == nil {
383 panic("MockMarshalAdapter.MarshalFunc: method is nil but MarshalAdapter.Marshal was just called")
384 }
385 callInfo := struct {
386 V any
387 }{
388 V: v,
389 }
390 mock.lockMarshal.Lock()
391 mock.calls.Marshal = append(mock.calls.Marshal, callInfo)
392 mock.lockMarshal.Unlock()
393 return mock.MarshalFunc(v)
394 }
395
396 // MarshalCalls gets all the calls that were made to Marshal.
397 // Check the length with:
398 //
399 // len(mockedMarshalAdapter.MarshalCalls())
400 func (mock *MockMarshalAdapter) MarshalCalls() []struct {
401 V any
402 } {
403 var calls []struct {
404 V any
405 }
406 mock.lockMarshal.RLock()
407 calls = mock.calls.Marshal
408 mock.lockMarshal.RUnlock()
409 return calls
410 }
411
412 // Redeem calls RedeemFunc.
413 func (mock *MockMarshalAdapter) Redeem() {
414 if mock.RedeemFunc == nil {
415 panic("MockMarshalAdapter.RedeemFunc: method is nil but MarshalAdapter.Redeem was just called")
416 }
417 callInfo := struct {
418 }{}
419 mock.lockRedeem.Lock()
420 mock.calls.Redeem = append(mock.calls.Redeem, callInfo)
421 mock.lockRedeem.Unlock()
422 mock.RedeemFunc()
423 }
424
425 // RedeemCalls gets all the calls that were made to Redeem.
426 // Check the length with:
427 //
428 // len(mockedMarshalAdapter.RedeemCalls())
429 func (mock *MockMarshalAdapter) RedeemCalls() []struct {
430 } {
431 var calls []struct {
432 }
433 mock.lockRedeem.RLock()
434 calls = mock.calls.Redeem
435 mock.lockRedeem.RUnlock()
436 return calls
437 }
438
439 // Reset calls ResetFunc.
440 func (mock *MockMarshalAdapter) Reset() {
441 if mock.ResetFunc == nil {
442 panic("MockMarshalAdapter.ResetFunc: method is nil but MarshalAdapter.Reset was just called")
443 }
444 callInfo := struct {
445 }{}
446 mock.lockReset.Lock()
447 mock.calls.Reset = append(mock.calls.Reset, callInfo)
448 mock.lockReset.Unlock()
449 mock.ResetFunc()
450 }
451
452 // ResetCalls gets all the calls that were made to Reset.
453 // Check the length with:
454 //
455 // len(mockedMarshalAdapter.ResetCalls())
456 func (mock *MockMarshalAdapter) ResetCalls() []struct {
457 } {
458 var calls []struct {
459 }
460 mock.lockReset.RLock()
461 calls = mock.calls.Reset
462 mock.lockReset.RUnlock()
463 return calls
464 }
465
466 // Ensure that MockOrderedMarshalAdapter does implement ifaces.OrderedMarshalAdapter.
467 // If this is not the case, regenerate this file with mockery.
468 var _ ifaces.OrderedMarshalAdapter = &MockOrderedMarshalAdapter{}
469
470 // MockOrderedMarshalAdapter is a mock implementation of ifaces.OrderedMarshalAdapter.
471 //
472 // func TestSomethingThatUsesOrderedMarshalAdapter(t *testing.T) {
473 //
474 // // make and configure a mocked ifaces.OrderedMarshalAdapter
475 // mockedOrderedMarshalAdapter := &MockOrderedMarshalAdapter{
476 // OrderedMarshalFunc: func(ordered ifaces.Ordered) ([]byte, error) {
477 // panic("mock out the OrderedMarshal method")
478 // },
479 // RedeemFunc: func() {
480 // panic("mock out the Redeem method")
481 // },
482 // ResetFunc: func() {
483 // panic("mock out the Reset method")
484 // },
485 // }
486 //
487 // // use mockedOrderedMarshalAdapter in code that requires ifaces.OrderedMarshalAdapter
488 // // and then make assertions.
489 //
490 // }
491 type MockOrderedMarshalAdapter struct {
492 // OrderedMarshalFunc mocks the OrderedMarshal method.
493 OrderedMarshalFunc func(ordered ifaces.Ordered) ([]byte, error)
494
495 // RedeemFunc mocks the Redeem method.
496 RedeemFunc func()
497
498 // ResetFunc mocks the Reset method.
499 ResetFunc func()
500
501 // calls tracks calls to the methods.
502 calls struct {
503 // OrderedMarshal holds details about calls to the OrderedMarshal method.
504 OrderedMarshal []struct {
505 // Ordered is the ordered argument value.
506 Ordered ifaces.Ordered
507 }
508 // Redeem holds details about calls to the Redeem method.
509 Redeem []struct {
510 }
511 // Reset holds details about calls to the Reset method.
512 Reset []struct {
513 }
514 }
515 lockOrderedMarshal sync.RWMutex
516 lockRedeem sync.RWMutex
517 lockReset sync.RWMutex
518 }
519
520 // OrderedMarshal calls OrderedMarshalFunc.
521 func (mock *MockOrderedMarshalAdapter) OrderedMarshal(ordered ifaces.Ordered) ([]byte, error) {
522 if mock.OrderedMarshalFunc == nil {
523 panic("MockOrderedMarshalAdapter.OrderedMarshalFunc: method is nil but OrderedMarshalAdapter.OrderedMarshal was just called")
524 }
525 callInfo := struct {
526 Ordered ifaces.Ordered
527 }{
528 Ordered: ordered,
529 }
530 mock.lockOrderedMarshal.Lock()
531 mock.calls.OrderedMarshal = append(mock.calls.OrderedMarshal, callInfo)
532 mock.lockOrderedMarshal.Unlock()
533 return mock.OrderedMarshalFunc(ordered)
534 }
535
536 // OrderedMarshalCalls gets all the calls that were made to OrderedMarshal.
537 // Check the length with:
538 //
539 // len(mockedOrderedMarshalAdapter.OrderedMarshalCalls())
540 func (mock *MockOrderedMarshalAdapter) OrderedMarshalCalls() []struct {
541 Ordered ifaces.Ordered
542 } {
543 var calls []struct {
544 Ordered ifaces.Ordered
545 }
546 mock.lockOrderedMarshal.RLock()
547 calls = mock.calls.OrderedMarshal
548 mock.lockOrderedMarshal.RUnlock()
549 return calls
550 }
551
552 // Redeem calls RedeemFunc.
553 func (mock *MockOrderedMarshalAdapter) Redeem() {
554 if mock.RedeemFunc == nil {
555 panic("MockOrderedMarshalAdapter.RedeemFunc: method is nil but OrderedMarshalAdapter.Redeem was just called")
556 }
557 callInfo := struct {
558 }{}
559 mock.lockRedeem.Lock()
560 mock.calls.Redeem = append(mock.calls.Redeem, callInfo)
561 mock.lockRedeem.Unlock()
562 mock.RedeemFunc()
563 }
564
565 // RedeemCalls gets all the calls that were made to Redeem.
566 // Check the length with:
567 //
568 // len(mockedOrderedMarshalAdapter.RedeemCalls())
569 func (mock *MockOrderedMarshalAdapter) RedeemCalls() []struct {
570 } {
571 var calls []struct {
572 }
573 mock.lockRedeem.RLock()
574 calls = mock.calls.Redeem
575 mock.lockRedeem.RUnlock()
576 return calls
577 }
578
579 // Reset calls ResetFunc.
580 func (mock *MockOrderedMarshalAdapter) Reset() {
581 if mock.ResetFunc == nil {
582 panic("MockOrderedMarshalAdapter.ResetFunc: method is nil but OrderedMarshalAdapter.Reset was just called")
583 }
584 callInfo := struct {
585 }{}
586 mock.lockReset.Lock()
587 mock.calls.Reset = append(mock.calls.Reset, callInfo)
588 mock.lockReset.Unlock()
589 mock.ResetFunc()
590 }
591
592 // ResetCalls gets all the calls that were made to Reset.
593 // Check the length with:
594 //
595 // len(mockedOrderedMarshalAdapter.ResetCalls())
596 func (mock *MockOrderedMarshalAdapter) ResetCalls() []struct {
597 } {
598 var calls []struct {
599 }
600 mock.lockReset.RLock()
601 calls = mock.calls.Reset
602 mock.lockReset.RUnlock()
603 return calls
604 }
605
606 // Ensure that MockUnmarshalAdapter does implement ifaces.UnmarshalAdapter.
607 // If this is not the case, regenerate this file with mockery.
608 var _ ifaces.UnmarshalAdapter = &MockUnmarshalAdapter{}
609
610 // MockUnmarshalAdapter is a mock implementation of ifaces.UnmarshalAdapter.
611 //
612 // func TestSomethingThatUsesUnmarshalAdapter(t *testing.T) {
613 //
614 // // make and configure a mocked ifaces.UnmarshalAdapter
615 // mockedUnmarshalAdapter := &MockUnmarshalAdapter{
616 // RedeemFunc: func() {
617 // panic("mock out the Redeem method")
618 // },
619 // ResetFunc: func() {
620 // panic("mock out the Reset method")
621 // },
622 // UnmarshalFunc: func(bytes []byte, v any) error {
623 // panic("mock out the Unmarshal method")
624 // },
625 // }
626 //
627 // // use mockedUnmarshalAdapter in code that requires ifaces.UnmarshalAdapter
628 // // and then make assertions.
629 //
630 // }
631 type MockUnmarshalAdapter struct {
632 // RedeemFunc mocks the Redeem method.
633 RedeemFunc func()
634
635 // ResetFunc mocks the Reset method.
636 ResetFunc func()
637
638 // UnmarshalFunc mocks the Unmarshal method.
639 UnmarshalFunc func(bytes []byte, v any) error
640
641 // calls tracks calls to the methods.
642 calls struct {
643 // Redeem holds details about calls to the Redeem method.
644 Redeem []struct {
645 }
646 // Reset holds details about calls to the Reset method.
647 Reset []struct {
648 }
649 // Unmarshal holds details about calls to the Unmarshal method.
650 Unmarshal []struct {
651 // Bytes is the bytes argument value.
652 Bytes []byte
653 // V is the v argument value.
654 V any
655 }
656 }
657 lockRedeem sync.RWMutex
658 lockReset sync.RWMutex
659 lockUnmarshal sync.RWMutex
660 }
661
662 // Redeem calls RedeemFunc.
663 func (mock *MockUnmarshalAdapter) Redeem() {
664 if mock.RedeemFunc == nil {
665 panic("MockUnmarshalAdapter.RedeemFunc: method is nil but UnmarshalAdapter.Redeem was just called")
666 }
667 callInfo := struct {
668 }{}
669 mock.lockRedeem.Lock()
670 mock.calls.Redeem = append(mock.calls.Redeem, callInfo)
671 mock.lockRedeem.Unlock()
672 mock.RedeemFunc()
673 }
674
675 // RedeemCalls gets all the calls that were made to Redeem.
676 // Check the length with:
677 //
678 // len(mockedUnmarshalAdapter.RedeemCalls())
679 func (mock *MockUnmarshalAdapter) RedeemCalls() []struct {
680 } {
681 var calls []struct {
682 }
683 mock.lockRedeem.RLock()
684 calls = mock.calls.Redeem
685 mock.lockRedeem.RUnlock()
686 return calls
687 }
688
689 // Reset calls ResetFunc.
690 func (mock *MockUnmarshalAdapter) Reset() {
691 if mock.ResetFunc == nil {
692 panic("MockUnmarshalAdapter.ResetFunc: method is nil but UnmarshalAdapter.Reset was just called")
693 }
694 callInfo := struct {
695 }{}
696 mock.lockReset.Lock()
697 mock.calls.Reset = append(mock.calls.Reset, callInfo)
698 mock.lockReset.Unlock()
699 mock.ResetFunc()
700 }
701
702 // ResetCalls gets all the calls that were made to Reset.
703 // Check the length with:
704 //
705 // len(mockedUnmarshalAdapter.ResetCalls())
706 func (mock *MockUnmarshalAdapter) ResetCalls() []struct {
707 } {
708 var calls []struct {
709 }
710 mock.lockReset.RLock()
711 calls = mock.calls.Reset
712 mock.lockReset.RUnlock()
713 return calls
714 }
715
716 // Unmarshal calls UnmarshalFunc.
717 func (mock *MockUnmarshalAdapter) Unmarshal(bytes []byte, v any) error {
718 if mock.UnmarshalFunc == nil {
719 panic("MockUnmarshalAdapter.UnmarshalFunc: method is nil but UnmarshalAdapter.Unmarshal was just called")
720 }
721 callInfo := struct {
722 Bytes []byte
723 V any
724 }{
725 Bytes: bytes,
726 V: v,
727 }
728 mock.lockUnmarshal.Lock()
729 mock.calls.Unmarshal = append(mock.calls.Unmarshal, callInfo)
730 mock.lockUnmarshal.Unlock()
731 return mock.UnmarshalFunc(bytes, v)
732 }
733
734 // UnmarshalCalls gets all the calls that were made to Unmarshal.
735 // Check the length with:
736 //
737 // len(mockedUnmarshalAdapter.UnmarshalCalls())
738 func (mock *MockUnmarshalAdapter) UnmarshalCalls() []struct {
739 Bytes []byte
740 V any
741 } {
742 var calls []struct {
743 Bytes []byte
744 V any
745 }
746 mock.lockUnmarshal.RLock()
747 calls = mock.calls.Unmarshal
748 mock.lockUnmarshal.RUnlock()
749 return calls
750 }
751
752 // Ensure that MockOrderedUnmarshalAdapter does implement ifaces.OrderedUnmarshalAdapter.
753 // If this is not the case, regenerate this file with mockery.
754 var _ ifaces.OrderedUnmarshalAdapter = &MockOrderedUnmarshalAdapter{}
755
756 // MockOrderedUnmarshalAdapter is a mock implementation of ifaces.OrderedUnmarshalAdapter.
757 //
758 // func TestSomethingThatUsesOrderedUnmarshalAdapter(t *testing.T) {
759 //
760 // // make and configure a mocked ifaces.OrderedUnmarshalAdapter
761 // mockedOrderedUnmarshalAdapter := &MockOrderedUnmarshalAdapter{
762 // OrderedUnmarshalFunc: func(bytes []byte, setOrdered ifaces.SetOrdered) error {
763 // panic("mock out the OrderedUnmarshal method")
764 // },
765 // RedeemFunc: func() {
766 // panic("mock out the Redeem method")
767 // },
768 // ResetFunc: func() {
769 // panic("mock out the Reset method")
770 // },
771 // }
772 //
773 // // use mockedOrderedUnmarshalAdapter in code that requires ifaces.OrderedUnmarshalAdapter
774 // // and then make assertions.
775 //
776 // }
777 type MockOrderedUnmarshalAdapter struct {
778 // OrderedUnmarshalFunc mocks the OrderedUnmarshal method.
779 OrderedUnmarshalFunc func(bytes []byte, setOrdered ifaces.SetOrdered) error
780
781 // RedeemFunc mocks the Redeem method.
782 RedeemFunc func()
783
784 // ResetFunc mocks the Reset method.
785 ResetFunc func()
786
787 // calls tracks calls to the methods.
788 calls struct {
789 // OrderedUnmarshal holds details about calls to the OrderedUnmarshal method.
790 OrderedUnmarshal []struct {
791 // Bytes is the bytes argument value.
792 Bytes []byte
793 // SetOrdered is the setOrdered argument value.
794 SetOrdered ifaces.SetOrdered
795 }
796 // Redeem holds details about calls to the Redeem method.
797 Redeem []struct {
798 }
799 // Reset holds details about calls to the Reset method.
800 Reset []struct {
801 }
802 }
803 lockOrderedUnmarshal sync.RWMutex
804 lockRedeem sync.RWMutex
805 lockReset sync.RWMutex
806 }
807
808 // OrderedUnmarshal calls OrderedUnmarshalFunc.
809 func (mock *MockOrderedUnmarshalAdapter) OrderedUnmarshal(bytes []byte, setOrdered ifaces.SetOrdered) error {
810 if mock.OrderedUnmarshalFunc == nil {
811 panic("MockOrderedUnmarshalAdapter.OrderedUnmarshalFunc: method is nil but OrderedUnmarshalAdapter.OrderedUnmarshal was just called")
812 }
813 callInfo := struct {
814 Bytes []byte
815 SetOrdered ifaces.SetOrdered
816 }{
817 Bytes: bytes,
818 SetOrdered: setOrdered,
819 }
820 mock.lockOrderedUnmarshal.Lock()
821 mock.calls.OrderedUnmarshal = append(mock.calls.OrderedUnmarshal, callInfo)
822 mock.lockOrderedUnmarshal.Unlock()
823 return mock.OrderedUnmarshalFunc(bytes, setOrdered)
824 }
825
826 // OrderedUnmarshalCalls gets all the calls that were made to OrderedUnmarshal.
827 // Check the length with:
828 //
829 // len(mockedOrderedUnmarshalAdapter.OrderedUnmarshalCalls())
830 func (mock *MockOrderedUnmarshalAdapter) OrderedUnmarshalCalls() []struct {
831 Bytes []byte
832 SetOrdered ifaces.SetOrdered
833 } {
834 var calls []struct {
835 Bytes []byte
836 SetOrdered ifaces.SetOrdered
837 }
838 mock.lockOrderedUnmarshal.RLock()
839 calls = mock.calls.OrderedUnmarshal
840 mock.lockOrderedUnmarshal.RUnlock()
841 return calls
842 }
843
844 // Redeem calls RedeemFunc.
845 func (mock *MockOrderedUnmarshalAdapter) Redeem() {
846 if mock.RedeemFunc == nil {
847 panic("MockOrderedUnmarshalAdapter.RedeemFunc: method is nil but OrderedUnmarshalAdapter.Redeem was just called")
848 }
849 callInfo := struct {
850 }{}
851 mock.lockRedeem.Lock()
852 mock.calls.Redeem = append(mock.calls.Redeem, callInfo)
853 mock.lockRedeem.Unlock()
854 mock.RedeemFunc()
855 }
856
857 // RedeemCalls gets all the calls that were made to Redeem.
858 // Check the length with:
859 //
860 // len(mockedOrderedUnmarshalAdapter.RedeemCalls())
861 func (mock *MockOrderedUnmarshalAdapter) RedeemCalls() []struct {
862 } {
863 var calls []struct {
864 }
865 mock.lockRedeem.RLock()
866 calls = mock.calls.Redeem
867 mock.lockRedeem.RUnlock()
868 return calls
869 }
870
871 // Reset calls ResetFunc.
872 func (mock *MockOrderedUnmarshalAdapter) Reset() {
873 if mock.ResetFunc == nil {
874 panic("MockOrderedUnmarshalAdapter.ResetFunc: method is nil but OrderedUnmarshalAdapter.Reset was just called")
875 }
876 callInfo := struct {
877 }{}
878 mock.lockReset.Lock()
879 mock.calls.Reset = append(mock.calls.Reset, callInfo)
880 mock.lockReset.Unlock()
881 mock.ResetFunc()
882 }
883
884 // ResetCalls gets all the calls that were made to Reset.
885 // Check the length with:
886 //
887 // len(mockedOrderedUnmarshalAdapter.ResetCalls())
888 func (mock *MockOrderedUnmarshalAdapter) ResetCalls() []struct {
889 } {
890 var calls []struct {
891 }
892 mock.lockReset.RLock()
893 calls = mock.calls.Reset
894 mock.lockReset.RUnlock()
895 return calls
896 }
897
898 // Ensure that MockAdapter does implement ifaces.Adapter.
899 // If this is not the case, regenerate this file with mockery.
900 var _ ifaces.Adapter = &MockAdapter{}
901
902 // MockAdapter is a mock implementation of ifaces.Adapter.
903 //
904 // func TestSomethingThatUsesAdapter(t *testing.T) {
905 //
906 // // make and configure a mocked ifaces.Adapter
907 // mockedAdapter := &MockAdapter{
908 // MarshalFunc: func(v any) ([]byte, error) {
909 // panic("mock out the Marshal method")
910 // },
911 // NewOrderedMapFunc: func(capacity int) ifaces.OrderedMap {
912 // panic("mock out the NewOrderedMap method")
913 // },
914 // OrderedMarshalFunc: func(ordered ifaces.Ordered) ([]byte, error) {
915 // panic("mock out the OrderedMarshal method")
916 // },
917 // OrderedUnmarshalFunc: func(bytes []byte, setOrdered ifaces.SetOrdered) error {
918 // panic("mock out the OrderedUnmarshal method")
919 // },
920 // RedeemFunc: func() {
921 // panic("mock out the Redeem method")
922 // },
923 // ResetFunc: func() {
924 // panic("mock out the Reset method")
925 // },
926 // UnmarshalFunc: func(bytes []byte, v any) error {
927 // panic("mock out the Unmarshal method")
928 // },
929 // }
930 //
931 // // use mockedAdapter in code that requires ifaces.Adapter
932 // // and then make assertions.
933 //
934 // }
935 type MockAdapter struct {
936 // MarshalFunc mocks the Marshal method.
937 MarshalFunc func(v any) ([]byte, error)
938
939 // NewOrderedMapFunc mocks the NewOrderedMap method.
940 NewOrderedMapFunc func(capacity int) ifaces.OrderedMap
941
942 // OrderedMarshalFunc mocks the OrderedMarshal method.
943 OrderedMarshalFunc func(ordered ifaces.Ordered) ([]byte, error)
944
945 // OrderedUnmarshalFunc mocks the OrderedUnmarshal method.
946 OrderedUnmarshalFunc func(bytes []byte, setOrdered ifaces.SetOrdered) error
947
948 // RedeemFunc mocks the Redeem method.
949 RedeemFunc func()
950
951 // ResetFunc mocks the Reset method.
952 ResetFunc func()
953
954 // UnmarshalFunc mocks the Unmarshal method.
955 UnmarshalFunc func(bytes []byte, v any) error
956
957 // calls tracks calls to the methods.
958 calls struct {
959 // Marshal holds details about calls to the Marshal method.
960 Marshal []struct {
961 // V is the v argument value.
962 V any
963 }
964 // NewOrderedMap holds details about calls to the NewOrderedMap method.
965 NewOrderedMap []struct {
966 // Capacity is the capacity argument value.
967 Capacity int
968 }
969 // OrderedMarshal holds details about calls to the OrderedMarshal method.
970 OrderedMarshal []struct {
971 // Ordered is the ordered argument value.
972 Ordered ifaces.Ordered
973 }
974 // OrderedUnmarshal holds details about calls to the OrderedUnmarshal method.
975 OrderedUnmarshal []struct {
976 // Bytes is the bytes argument value.
977 Bytes []byte
978 // SetOrdered is the setOrdered argument value.
979 SetOrdered ifaces.SetOrdered
980 }
981 // Redeem holds details about calls to the Redeem method.
982 Redeem []struct {
983 }
984 // Reset holds details about calls to the Reset method.
985 Reset []struct {
986 }
987 // Unmarshal holds details about calls to the Unmarshal method.
988 Unmarshal []struct {
989 // Bytes is the bytes argument value.
990 Bytes []byte
991 // V is the v argument value.
992 V any
993 }
994 }
995 lockMarshal sync.RWMutex
996 lockNewOrderedMap sync.RWMutex
997 lockOrderedMarshal sync.RWMutex
998 lockOrderedUnmarshal sync.RWMutex
999 lockRedeem sync.RWMutex
1000 lockReset sync.RWMutex
1001 lockUnmarshal sync.RWMutex
1002 }
1003
1004 // Marshal calls MarshalFunc.
1005 func (mock *MockAdapter) Marshal(v any) ([]byte, error) {
1006 if mock.MarshalFunc == nil {
1007 panic("MockAdapter.MarshalFunc: method is nil but Adapter.Marshal was just called")
1008 }
1009 callInfo := struct {
1010 V any
1011 }{
1012 V: v,
1013 }
1014 mock.lockMarshal.Lock()
1015 mock.calls.Marshal = append(mock.calls.Marshal, callInfo)
1016 mock.lockMarshal.Unlock()
1017 return mock.MarshalFunc(v)
1018 }
1019
1020 // MarshalCalls gets all the calls that were made to Marshal.
1021 // Check the length with:
1022 //
1023 // len(mockedAdapter.MarshalCalls())
1024 func (mock *MockAdapter) MarshalCalls() []struct {
1025 V any
1026 } {
1027 var calls []struct {
1028 V any
1029 }
1030 mock.lockMarshal.RLock()
1031 calls = mock.calls.Marshal
1032 mock.lockMarshal.RUnlock()
1033 return calls
1034 }
1035
1036 // NewOrderedMap calls NewOrderedMapFunc.
1037 func (mock *MockAdapter) NewOrderedMap(capacity int) ifaces.OrderedMap {
1038 if mock.NewOrderedMapFunc == nil {
1039 panic("MockAdapter.NewOrderedMapFunc: method is nil but Adapter.NewOrderedMap was just called")
1040 }
1041 callInfo := struct {
1042 Capacity int
1043 }{
1044 Capacity: capacity,
1045 }
1046 mock.lockNewOrderedMap.Lock()
1047 mock.calls.NewOrderedMap = append(mock.calls.NewOrderedMap, callInfo)
1048 mock.lockNewOrderedMap.Unlock()
1049 return mock.NewOrderedMapFunc(capacity)
1050 }
1051
1052 // NewOrderedMapCalls gets all the calls that were made to NewOrderedMap.
1053 // Check the length with:
1054 //
1055 // len(mockedAdapter.NewOrderedMapCalls())
1056 func (mock *MockAdapter) NewOrderedMapCalls() []struct {
1057 Capacity int
1058 } {
1059 var calls []struct {
1060 Capacity int
1061 }
1062 mock.lockNewOrderedMap.RLock()
1063 calls = mock.calls.NewOrderedMap
1064 mock.lockNewOrderedMap.RUnlock()
1065 return calls
1066 }
1067
1068 // OrderedMarshal calls OrderedMarshalFunc.
1069 func (mock *MockAdapter) OrderedMarshal(ordered ifaces.Ordered) ([]byte, error) {
1070 if mock.OrderedMarshalFunc == nil {
1071 panic("MockAdapter.OrderedMarshalFunc: method is nil but Adapter.OrderedMarshal was just called")
1072 }
1073 callInfo := struct {
1074 Ordered ifaces.Ordered
1075 }{
1076 Ordered: ordered,
1077 }
1078 mock.lockOrderedMarshal.Lock()
1079 mock.calls.OrderedMarshal = append(mock.calls.OrderedMarshal, callInfo)
1080 mock.lockOrderedMarshal.Unlock()
1081 return mock.OrderedMarshalFunc(ordered)
1082 }
1083
1084 // OrderedMarshalCalls gets all the calls that were made to OrderedMarshal.
1085 // Check the length with:
1086 //
1087 // len(mockedAdapter.OrderedMarshalCalls())
1088 func (mock *MockAdapter) OrderedMarshalCalls() []struct {
1089 Ordered ifaces.Ordered
1090 } {
1091 var calls []struct {
1092 Ordered ifaces.Ordered
1093 }
1094 mock.lockOrderedMarshal.RLock()
1095 calls = mock.calls.OrderedMarshal
1096 mock.lockOrderedMarshal.RUnlock()
1097 return calls
1098 }
1099
1100 // OrderedUnmarshal calls OrderedUnmarshalFunc.
1101 func (mock *MockAdapter) OrderedUnmarshal(bytes []byte, setOrdered ifaces.SetOrdered) error {
1102 if mock.OrderedUnmarshalFunc == nil {
1103 panic("MockAdapter.OrderedUnmarshalFunc: method is nil but Adapter.OrderedUnmarshal was just called")
1104 }
1105 callInfo := struct {
1106 Bytes []byte
1107 SetOrdered ifaces.SetOrdered
1108 }{
1109 Bytes: bytes,
1110 SetOrdered: setOrdered,
1111 }
1112 mock.lockOrderedUnmarshal.Lock()
1113 mock.calls.OrderedUnmarshal = append(mock.calls.OrderedUnmarshal, callInfo)
1114 mock.lockOrderedUnmarshal.Unlock()
1115 return mock.OrderedUnmarshalFunc(bytes, setOrdered)
1116 }
1117
1118 // OrderedUnmarshalCalls gets all the calls that were made to OrderedUnmarshal.
1119 // Check the length with:
1120 //
1121 // len(mockedAdapter.OrderedUnmarshalCalls())
1122 func (mock *MockAdapter) OrderedUnmarshalCalls() []struct {
1123 Bytes []byte
1124 SetOrdered ifaces.SetOrdered
1125 } {
1126 var calls []struct {
1127 Bytes []byte
1128 SetOrdered ifaces.SetOrdered
1129 }
1130 mock.lockOrderedUnmarshal.RLock()
1131 calls = mock.calls.OrderedUnmarshal
1132 mock.lockOrderedUnmarshal.RUnlock()
1133 return calls
1134 }
1135
1136 // Redeem calls RedeemFunc.
1137 func (mock *MockAdapter) Redeem() {
1138 if mock.RedeemFunc == nil {
1139 panic("MockAdapter.RedeemFunc: method is nil but Adapter.Redeem was just called")
1140 }
1141 callInfo := struct {
1142 }{}
1143 mock.lockRedeem.Lock()
1144 mock.calls.Redeem = append(mock.calls.Redeem, callInfo)
1145 mock.lockRedeem.Unlock()
1146 mock.RedeemFunc()
1147 }
1148
1149 // RedeemCalls gets all the calls that were made to Redeem.
1150 // Check the length with:
1151 //
1152 // len(mockedAdapter.RedeemCalls())
1153 func (mock *MockAdapter) RedeemCalls() []struct {
1154 } {
1155 var calls []struct {
1156 }
1157 mock.lockRedeem.RLock()
1158 calls = mock.calls.Redeem
1159 mock.lockRedeem.RUnlock()
1160 return calls
1161 }
1162
1163 // Reset calls ResetFunc.
1164 func (mock *MockAdapter) Reset() {
1165 if mock.ResetFunc == nil {
1166 panic("MockAdapter.ResetFunc: method is nil but Adapter.Reset was just called")
1167 }
1168 callInfo := struct {
1169 }{}
1170 mock.lockReset.Lock()
1171 mock.calls.Reset = append(mock.calls.Reset, callInfo)
1172 mock.lockReset.Unlock()
1173 mock.ResetFunc()
1174 }
1175
1176 // ResetCalls gets all the calls that were made to Reset.
1177 // Check the length with:
1178 //
1179 // len(mockedAdapter.ResetCalls())
1180 func (mock *MockAdapter) ResetCalls() []struct {
1181 } {
1182 var calls []struct {
1183 }
1184 mock.lockReset.RLock()
1185 calls = mock.calls.Reset
1186 mock.lockReset.RUnlock()
1187 return calls
1188 }
1189
1190 // Unmarshal calls UnmarshalFunc.
1191 func (mock *MockAdapter) Unmarshal(bytes []byte, v any) error {
1192 if mock.UnmarshalFunc == nil {
1193 panic("MockAdapter.UnmarshalFunc: method is nil but Adapter.Unmarshal was just called")
1194 }
1195 callInfo := struct {
1196 Bytes []byte
1197 V any
1198 }{
1199 Bytes: bytes,
1200 V: v,
1201 }
1202 mock.lockUnmarshal.Lock()
1203 mock.calls.Unmarshal = append(mock.calls.Unmarshal, callInfo)
1204 mock.lockUnmarshal.Unlock()
1205 return mock.UnmarshalFunc(bytes, v)
1206 }
1207
1208 // UnmarshalCalls gets all the calls that were made to Unmarshal.
1209 // Check the length with:
1210 //
1211 // len(mockedAdapter.UnmarshalCalls())
1212 func (mock *MockAdapter) UnmarshalCalls() []struct {
1213 Bytes []byte
1214 V any
1215 } {
1216 var calls []struct {
1217 Bytes []byte
1218 V any
1219 }
1220 mock.lockUnmarshal.RLock()
1221 calls = mock.calls.Unmarshal
1222 mock.lockUnmarshal.RUnlock()
1223 return calls
1224 }
1225
1226 // Ensure that MockOrderedAdapter does implement ifaces.OrderedAdapter.
1227 // If this is not the case, regenerate this file with mockery.
1228 var _ ifaces.OrderedAdapter = &MockOrderedAdapter{}
1229
1230 // MockOrderedAdapter is a mock implementation of ifaces.OrderedAdapter.
1231 //
1232 // func TestSomethingThatUsesOrderedAdapter(t *testing.T) {
1233 //
1234 // // make and configure a mocked ifaces.OrderedAdapter
1235 // mockedOrderedAdapter := &MockOrderedAdapter{
1236 // NewOrderedMapFunc: func(capacity int) ifaces.OrderedMap {
1237 // panic("mock out the NewOrderedMap method")
1238 // },
1239 // OrderedMarshalFunc: func(ordered ifaces.Ordered) ([]byte, error) {
1240 // panic("mock out the OrderedMarshal method")
1241 // },
1242 // OrderedUnmarshalFunc: func(bytes []byte, setOrdered ifaces.SetOrdered) error {
1243 // panic("mock out the OrderedUnmarshal method")
1244 // },
1245 // RedeemFunc: func() {
1246 // panic("mock out the Redeem method")
1247 // },
1248 // ResetFunc: func() {
1249 // panic("mock out the Reset method")
1250 // },
1251 // }
1252 //
1253 // // use mockedOrderedAdapter in code that requires ifaces.OrderedAdapter
1254 // // and then make assertions.
1255 //
1256 // }
1257 type MockOrderedAdapter struct {
1258 // NewOrderedMapFunc mocks the NewOrderedMap method.
1259 NewOrderedMapFunc func(capacity int) ifaces.OrderedMap
1260
1261 // OrderedMarshalFunc mocks the OrderedMarshal method.
1262 OrderedMarshalFunc func(ordered ifaces.Ordered) ([]byte, error)
1263
1264 // OrderedUnmarshalFunc mocks the OrderedUnmarshal method.
1265 OrderedUnmarshalFunc func(bytes []byte, setOrdered ifaces.SetOrdered) error
1266
1267 // RedeemFunc mocks the Redeem method.
1268 RedeemFunc func()
1269
1270 // ResetFunc mocks the Reset method.
1271 ResetFunc func()
1272
1273 // calls tracks calls to the methods.
1274 calls struct {
1275 // NewOrderedMap holds details about calls to the NewOrderedMap method.
1276 NewOrderedMap []struct {
1277 // Capacity is the capacity argument value.
1278 Capacity int
1279 }
1280 // OrderedMarshal holds details about calls to the OrderedMarshal method.
1281 OrderedMarshal []struct {
1282 // Ordered is the ordered argument value.
1283 Ordered ifaces.Ordered
1284 }
1285 // OrderedUnmarshal holds details about calls to the OrderedUnmarshal method.
1286 OrderedUnmarshal []struct {
1287 // Bytes is the bytes argument value.
1288 Bytes []byte
1289 // SetOrdered is the setOrdered argument value.
1290 SetOrdered ifaces.SetOrdered
1291 }
1292 // Redeem holds details about calls to the Redeem method.
1293 Redeem []struct {
1294 }
1295 // Reset holds details about calls to the Reset method.
1296 Reset []struct {
1297 }
1298 }
1299 lockNewOrderedMap sync.RWMutex
1300 lockOrderedMarshal sync.RWMutex
1301 lockOrderedUnmarshal sync.RWMutex
1302 lockRedeem sync.RWMutex
1303 lockReset sync.RWMutex
1304 }
1305
1306 // NewOrderedMap calls NewOrderedMapFunc.
1307 func (mock *MockOrderedAdapter) NewOrderedMap(capacity int) ifaces.OrderedMap {
1308 if mock.NewOrderedMapFunc == nil {
1309 panic("MockOrderedAdapter.NewOrderedMapFunc: method is nil but OrderedAdapter.NewOrderedMap was just called")
1310 }
1311 callInfo := struct {
1312 Capacity int
1313 }{
1314 Capacity: capacity,
1315 }
1316 mock.lockNewOrderedMap.Lock()
1317 mock.calls.NewOrderedMap = append(mock.calls.NewOrderedMap, callInfo)
1318 mock.lockNewOrderedMap.Unlock()
1319 return mock.NewOrderedMapFunc(capacity)
1320 }
1321
1322 // NewOrderedMapCalls gets all the calls that were made to NewOrderedMap.
1323 // Check the length with:
1324 //
1325 // len(mockedOrderedAdapter.NewOrderedMapCalls())
1326 func (mock *MockOrderedAdapter) NewOrderedMapCalls() []struct {
1327 Capacity int
1328 } {
1329 var calls []struct {
1330 Capacity int
1331 }
1332 mock.lockNewOrderedMap.RLock()
1333 calls = mock.calls.NewOrderedMap
1334 mock.lockNewOrderedMap.RUnlock()
1335 return calls
1336 }
1337
1338 // OrderedMarshal calls OrderedMarshalFunc.
1339 func (mock *MockOrderedAdapter) OrderedMarshal(ordered ifaces.Ordered) ([]byte, error) {
1340 if mock.OrderedMarshalFunc == nil {
1341 panic("MockOrderedAdapter.OrderedMarshalFunc: method is nil but OrderedAdapter.OrderedMarshal was just called")
1342 }
1343 callInfo := struct {
1344 Ordered ifaces.Ordered
1345 }{
1346 Ordered: ordered,
1347 }
1348 mock.lockOrderedMarshal.Lock()
1349 mock.calls.OrderedMarshal = append(mock.calls.OrderedMarshal, callInfo)
1350 mock.lockOrderedMarshal.Unlock()
1351 return mock.OrderedMarshalFunc(ordered)
1352 }
1353
1354 // OrderedMarshalCalls gets all the calls that were made to OrderedMarshal.
1355 // Check the length with:
1356 //
1357 // len(mockedOrderedAdapter.OrderedMarshalCalls())
1358 func (mock *MockOrderedAdapter) OrderedMarshalCalls() []struct {
1359 Ordered ifaces.Ordered
1360 } {
1361 var calls []struct {
1362 Ordered ifaces.Ordered
1363 }
1364 mock.lockOrderedMarshal.RLock()
1365 calls = mock.calls.OrderedMarshal
1366 mock.lockOrderedMarshal.RUnlock()
1367 return calls
1368 }
1369
1370 // OrderedUnmarshal calls OrderedUnmarshalFunc.
1371 func (mock *MockOrderedAdapter) OrderedUnmarshal(bytes []byte, setOrdered ifaces.SetOrdered) error {
1372 if mock.OrderedUnmarshalFunc == nil {
1373 panic("MockOrderedAdapter.OrderedUnmarshalFunc: method is nil but OrderedAdapter.OrderedUnmarshal was just called")
1374 }
1375 callInfo := struct {
1376 Bytes []byte
1377 SetOrdered ifaces.SetOrdered
1378 }{
1379 Bytes: bytes,
1380 SetOrdered: setOrdered,
1381 }
1382 mock.lockOrderedUnmarshal.Lock()
1383 mock.calls.OrderedUnmarshal = append(mock.calls.OrderedUnmarshal, callInfo)
1384 mock.lockOrderedUnmarshal.Unlock()
1385 return mock.OrderedUnmarshalFunc(bytes, setOrdered)
1386 }
1387
1388 // OrderedUnmarshalCalls gets all the calls that were made to OrderedUnmarshal.
1389 // Check the length with:
1390 //
1391 // len(mockedOrderedAdapter.OrderedUnmarshalCalls())
1392 func (mock *MockOrderedAdapter) OrderedUnmarshalCalls() []struct {
1393 Bytes []byte
1394 SetOrdered ifaces.SetOrdered
1395 } {
1396 var calls []struct {
1397 Bytes []byte
1398 SetOrdered ifaces.SetOrdered
1399 }
1400 mock.lockOrderedUnmarshal.RLock()
1401 calls = mock.calls.OrderedUnmarshal
1402 mock.lockOrderedUnmarshal.RUnlock()
1403 return calls
1404 }
1405
1406 // Redeem calls RedeemFunc.
1407 func (mock *MockOrderedAdapter) Redeem() {
1408 if mock.RedeemFunc == nil {
1409 panic("MockOrderedAdapter.RedeemFunc: method is nil but OrderedAdapter.Redeem was just called")
1410 }
1411 callInfo := struct {
1412 }{}
1413 mock.lockRedeem.Lock()
1414 mock.calls.Redeem = append(mock.calls.Redeem, callInfo)
1415 mock.lockRedeem.Unlock()
1416 mock.RedeemFunc()
1417 }
1418
1419 // RedeemCalls gets all the calls that were made to Redeem.
1420 // Check the length with:
1421 //
1422 // len(mockedOrderedAdapter.RedeemCalls())
1423 func (mock *MockOrderedAdapter) RedeemCalls() []struct {
1424 } {
1425 var calls []struct {
1426 }
1427 mock.lockRedeem.RLock()
1428 calls = mock.calls.Redeem
1429 mock.lockRedeem.RUnlock()
1430 return calls
1431 }
1432
1433 // Reset calls ResetFunc.
1434 func (mock *MockOrderedAdapter) Reset() {
1435 if mock.ResetFunc == nil {
1436 panic("MockOrderedAdapter.ResetFunc: method is nil but OrderedAdapter.Reset was just called")
1437 }
1438 callInfo := struct {
1439 }{}
1440 mock.lockReset.Lock()
1441 mock.calls.Reset = append(mock.calls.Reset, callInfo)
1442 mock.lockReset.Unlock()
1443 mock.ResetFunc()
1444 }
1445
1446 // ResetCalls gets all the calls that were made to Reset.
1447 // Check the length with:
1448 //
1449 // len(mockedOrderedAdapter.ResetCalls())
1450 func (mock *MockOrderedAdapter) ResetCalls() []struct {
1451 } {
1452 var calls []struct {
1453 }
1454 mock.lockReset.RLock()
1455 calls = mock.calls.Reset
1456 mock.lockReset.RUnlock()
1457 return calls
1458 }
1459
1460 // Ensure that MockPoolable does implement ifaces.Poolable.
1461 // If this is not the case, regenerate this file with mockery.
1462 var _ ifaces.Poolable = &MockPoolable{}
1463
1464 // MockPoolable is a mock implementation of ifaces.Poolable.
1465 //
1466 // func TestSomethingThatUsesPoolable(t *testing.T) {
1467 //
1468 // // make and configure a mocked ifaces.Poolable
1469 // mockedPoolable := &MockPoolable{
1470 // RedeemFunc: func() {
1471 // panic("mock out the Redeem method")
1472 // },
1473 // ResetFunc: func() {
1474 // panic("mock out the Reset method")
1475 // },
1476 // }
1477 //
1478 // // use mockedPoolable in code that requires ifaces.Poolable
1479 // // and then make assertions.
1480 //
1481 // }
1482 type MockPoolable struct {
1483 // RedeemFunc mocks the Redeem method.
1484 RedeemFunc func()
1485
1486 // ResetFunc mocks the Reset method.
1487 ResetFunc func()
1488
1489 // calls tracks calls to the methods.
1490 calls struct {
1491 // Redeem holds details about calls to the Redeem method.
1492 Redeem []struct {
1493 }
1494 // Reset holds details about calls to the Reset method.
1495 Reset []struct {
1496 }
1497 }
1498 lockRedeem sync.RWMutex
1499 lockReset sync.RWMutex
1500 }
1501
1502 // Redeem calls RedeemFunc.
1503 func (mock *MockPoolable) Redeem() {
1504 if mock.RedeemFunc == nil {
1505 panic("MockPoolable.RedeemFunc: method is nil but Poolable.Redeem was just called")
1506 }
1507 callInfo := struct {
1508 }{}
1509 mock.lockRedeem.Lock()
1510 mock.calls.Redeem = append(mock.calls.Redeem, callInfo)
1511 mock.lockRedeem.Unlock()
1512 mock.RedeemFunc()
1513 }
1514
1515 // RedeemCalls gets all the calls that were made to Redeem.
1516 // Check the length with:
1517 //
1518 // len(mockedPoolable.RedeemCalls())
1519 func (mock *MockPoolable) RedeemCalls() []struct {
1520 } {
1521 var calls []struct {
1522 }
1523 mock.lockRedeem.RLock()
1524 calls = mock.calls.Redeem
1525 mock.lockRedeem.RUnlock()
1526 return calls
1527 }
1528
1529 // Reset calls ResetFunc.
1530 func (mock *MockPoolable) Reset() {
1531 if mock.ResetFunc == nil {
1532 panic("MockPoolable.ResetFunc: method is nil but Poolable.Reset was just called")
1533 }
1534 callInfo := struct {
1535 }{}
1536 mock.lockReset.Lock()
1537 mock.calls.Reset = append(mock.calls.Reset, callInfo)
1538 mock.lockReset.Unlock()
1539 mock.ResetFunc()
1540 }
1541
1542 // ResetCalls gets all the calls that were made to Reset.
1543 // Check the length with:
1544 //
1545 // len(mockedPoolable.ResetCalls())
1546 func (mock *MockPoolable) ResetCalls() []struct {
1547 } {
1548 var calls []struct {
1549 }
1550 mock.lockReset.RLock()
1551 calls = mock.calls.Reset
1552 mock.lockReset.RUnlock()
1553 return calls
1554 }
1555
1556 // Ensure that MockRegistrar does implement ifaces.Registrar.
1557 // If this is not the case, regenerate this file with mockery.
1558 var _ ifaces.Registrar = &MockRegistrar{}
1559
1560 // MockRegistrar is a mock implementation of ifaces.Registrar.
1561 //
1562 // func TestSomethingThatUsesRegistrar(t *testing.T) {
1563 //
1564 // // make and configure a mocked ifaces.Registrar
1565 // mockedRegistrar := &MockRegistrar{
1566 // RegisterForFunc: func(registryEntry ifaces.RegistryEntry) {
1567 // panic("mock out the RegisterFor method")
1568 // },
1569 // }
1570 //
1571 // // use mockedRegistrar in code that requires ifaces.Registrar
1572 // // and then make assertions.
1573 //
1574 // }
1575 type MockRegistrar struct {
1576 // RegisterForFunc mocks the RegisterFor method.
1577 RegisterForFunc func(registryEntry ifaces.RegistryEntry)
1578
1579 // calls tracks calls to the methods.
1580 calls struct {
1581 // RegisterFor holds details about calls to the RegisterFor method.
1582 RegisterFor []struct {
1583 // RegistryEntry is the registryEntry argument value.
1584 RegistryEntry ifaces.RegistryEntry
1585 }
1586 }
1587 lockRegisterFor sync.RWMutex
1588 }
1589
1590 // RegisterFor calls RegisterForFunc.
1591 func (mock *MockRegistrar) RegisterFor(registryEntry ifaces.RegistryEntry) {
1592 if mock.RegisterForFunc == nil {
1593 panic("MockRegistrar.RegisterForFunc: method is nil but Registrar.RegisterFor was just called")
1594 }
1595 callInfo := struct {
1596 RegistryEntry ifaces.RegistryEntry
1597 }{
1598 RegistryEntry: registryEntry,
1599 }
1600 mock.lockRegisterFor.Lock()
1601 mock.calls.RegisterFor = append(mock.calls.RegisterFor, callInfo)
1602 mock.lockRegisterFor.Unlock()
1603 mock.RegisterForFunc(registryEntry)
1604 }
1605
1606 // RegisterForCalls gets all the calls that were made to RegisterFor.
1607 // Check the length with:
1608 //
1609 // len(mockedRegistrar.RegisterForCalls())
1610 func (mock *MockRegistrar) RegisterForCalls() []struct {
1611 RegistryEntry ifaces.RegistryEntry
1612 } {
1613 var calls []struct {
1614 RegistryEntry ifaces.RegistryEntry
1615 }
1616 mock.lockRegisterFor.RLock()
1617 calls = mock.calls.RegisterFor
1618 mock.lockRegisterFor.RUnlock()
1619 return calls
1620 }