1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package portsmocks
6
7import (
8 "context"
9 "io"
10
11 "github.com/bnema/nefercap/internal/ports"
12 mock "github.com/stretchr/testify/mock"
13)
14
15// NewMockSource creates a new instance of MockSource. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMockSource(t interface {
18 mock.TestingT
19 Cleanup(func())
20}) *MockSource {
21 if helper, ok := t.(interface{ Helper() }); ok {
22 helper.Helper()
23 }
24
25 mock := &MockSource{}
26 mock.Mock.Test(t)
27
28 t.Cleanup(func() {
29 if helper, ok := t.(interface{ Helper() }); ok {
30 helper.Helper()
31 }
32 mock.AssertExpectations(t)
33 })
34
35 return mock
36}
37
38// MockSource is an autogenerated mock type for the Source type
39type MockSource struct {
40 mock.Mock
41}
42
43type MockSource_Expecter struct {
44 mock *mock.Mock
45}
46
47func (_m *MockSource) EXPECT() *MockSource_Expecter {
48 return &MockSource_Expecter{mock: &_m.Mock}
49}
50
51// Capabilities provides a mock function for the type MockSource
52func (_mock *MockSource) Capabilities() ports.Capabilities {
53 ret := _mock.Called()
54
55 if len(ret) == 0 {
56 panic("no return value specified for Capabilities")
57 }
58
59 var r0 ports.Capabilities
60 if returnFunc, ok := ret.Get(0).(func() ports.Capabilities); ok {
61 r0 = returnFunc()
62 } else {
63 r0 = ret.Get(0).(ports.Capabilities)
64 }
65 return r0
66}
67
68// MockSource_Capabilities_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Capabilities'
69type MockSource_Capabilities_Call struct {
70 *mock.Call
71}
72
73// Capabilities is a helper method to define mock.On call
74func (_e *MockSource_Expecter) Capabilities() *MockSource_Capabilities_Call {
75 return &MockSource_Capabilities_Call{Call: _e.mock.On("Capabilities")}
76}
77
78func (_c *MockSource_Capabilities_Call) Run(run func()) *MockSource_Capabilities_Call {
79 _c.Call.Run(func(args mock.Arguments) {
80 run()
81 })
82 return _c
83}
84
85func (_c *MockSource_Capabilities_Call) Return(capabilities ports.Capabilities) *MockSource_Capabilities_Call {
86 _c.Call.Return(capabilities)
87 return _c
88}
89
90func (_c *MockSource_Capabilities_Call) RunAndReturn(run func() ports.Capabilities) *MockSource_Capabilities_Call {
91 _c.Call.Return(run)
92 return _c
93}
94
95// Capture provides a mock function for the type MockSource
96func (_mock *MockSource) Capture(context1 context.Context, target ports.Target) (ports.Frame, error) {
97 ret := _mock.Called(context1, target)
98
99 if len(ret) == 0 {
100 panic("no return value specified for Capture")
101 }
102
103 var r0 ports.Frame
104 var r1 error
105 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.Target) (ports.Frame, error)); ok {
106 return returnFunc(context1, target)
107 }
108 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.Target) ports.Frame); ok {
109 r0 = returnFunc(context1, target)
110 } else {
111 r0 = ret.Get(0).(ports.Frame)
112 }
113 if returnFunc, ok := ret.Get(1).(func(context.Context, ports.Target) error); ok {
114 r1 = returnFunc(context1, target)
115 } else {
116 r1 = ret.Error(1)
117 }
118 return r0, r1
119}
120
121// MockSource_Capture_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Capture'
122type MockSource_Capture_Call struct {
123 *mock.Call
124}
125
126// Capture is a helper method to define mock.On call
127// - context1 context.Context
128// - target ports.Target
129func (_e *MockSource_Expecter) Capture(context1 any, target any) *MockSource_Capture_Call {
130 return &MockSource_Capture_Call{Call: _e.mock.On("Capture", context1, target)}
131}
132
133func (_c *MockSource_Capture_Call) Run(run func(context1 context.Context, target ports.Target)) *MockSource_Capture_Call {
134 _c.Call.Run(func(args mock.Arguments) {
135 var arg0 context.Context
136 if args[0] != nil {
137 arg0 = args[0].(context.Context)
138 }
139 var arg1 ports.Target
140 if args[1] != nil {
141 arg1 = args[1].(ports.Target)
142 }
143 run(
144 arg0,
145 arg1,
146 )
147 })
148 return _c
149}
150
151func (_c *MockSource_Capture_Call) Return(frame ports.Frame, err error) *MockSource_Capture_Call {
152 _c.Call.Return(frame, err)
153 return _c
154}
155
156func (_c *MockSource_Capture_Call) RunAndReturn(run func(context1 context.Context, target ports.Target) (ports.Frame, error)) *MockSource_Capture_Call {
157 _c.Call.Return(run)
158 return _c
159}
160
161// Close provides a mock function for the type MockSource
162func (_mock *MockSource) Close() error {
163 ret := _mock.Called()
164
165 if len(ret) == 0 {
166 panic("no return value specified for Close")
167 }
168
169 var r0 error
170 if returnFunc, ok := ret.Get(0).(func() error); ok {
171 r0 = returnFunc()
172 } else {
173 r0 = ret.Error(0)
174 }
175 return r0
176}
177
178// MockSource_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
179type MockSource_Close_Call struct {
180 *mock.Call
181}
182
183// Close is a helper method to define mock.On call
184func (_e *MockSource_Expecter) Close() *MockSource_Close_Call {
185 return &MockSource_Close_Call{Call: _e.mock.On("Close")}
186}
187
188func (_c *MockSource_Close_Call) Run(run func()) *MockSource_Close_Call {
189 _c.Call.Run(func(args mock.Arguments) {
190 run()
191 })
192 return _c
193}
194
195func (_c *MockSource_Close_Call) Return(err error) *MockSource_Close_Call {
196 _c.Call.Return(err)
197 return _c
198}
199
200func (_c *MockSource_Close_Call) RunAndReturn(run func() error) *MockSource_Close_Call {
201 _c.Call.Return(run)
202 return _c
203}
204
205// Outputs provides a mock function for the type MockSource
206func (_mock *MockSource) Outputs(context1 context.Context) ([]ports.Output, error) {
207 ret := _mock.Called(context1)
208
209 if len(ret) == 0 {
210 panic("no return value specified for Outputs")
211 }
212
213 var r0 []ports.Output
214 var r1 error
215 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]ports.Output, error)); ok {
216 return returnFunc(context1)
217 }
218 if returnFunc, ok := ret.Get(0).(func(context.Context) []ports.Output); ok {
219 r0 = returnFunc(context1)
220 } else {
221 if ret.Get(0) != nil {
222 r0 = ret.Get(0).([]ports.Output)
223 }
224 }
225 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
226 r1 = returnFunc(context1)
227 } else {
228 r1 = ret.Error(1)
229 }
230 return r0, r1
231}
232
233// MockSource_Outputs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Outputs'
234type MockSource_Outputs_Call struct {
235 *mock.Call
236}
237
238// Outputs is a helper method to define mock.On call
239// - context1 context.Context
240func (_e *MockSource_Expecter) Outputs(context1 any) *MockSource_Outputs_Call {
241 return &MockSource_Outputs_Call{Call: _e.mock.On("Outputs", context1)}
242}
243
244func (_c *MockSource_Outputs_Call) Run(run func(context1 context.Context)) *MockSource_Outputs_Call {
245 _c.Call.Run(func(args mock.Arguments) {
246 var arg0 context.Context
247 if args[0] != nil {
248 arg0 = args[0].(context.Context)
249 }
250 run(
251 arg0,
252 )
253 })
254 return _c
255}
256
257func (_c *MockSource_Outputs_Call) Return(outputs []ports.Output, err error) *MockSource_Outputs_Call {
258 _c.Call.Return(outputs, err)
259 return _c
260}
261
262func (_c *MockSource_Outputs_Call) RunAndReturn(run func(context1 context.Context) ([]ports.Output, error)) *MockSource_Outputs_Call {
263 _c.Call.Return(run)
264 return _c
265}
266
267// Workspaces provides a mock function for the type MockSource
268func (_mock *MockSource) Workspaces(context1 context.Context) ([]ports.Workspace, error) {
269 ret := _mock.Called(context1)
270
271 if len(ret) == 0 {
272 panic("no return value specified for Workspaces")
273 }
274
275 var r0 []ports.Workspace
276 var r1 error
277 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]ports.Workspace, error)); ok {
278 return returnFunc(context1)
279 }
280 if returnFunc, ok := ret.Get(0).(func(context.Context) []ports.Workspace); ok {
281 r0 = returnFunc(context1)
282 } else {
283 if ret.Get(0) != nil {
284 r0 = ret.Get(0).([]ports.Workspace)
285 }
286 }
287 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
288 r1 = returnFunc(context1)
289 } else {
290 r1 = ret.Error(1)
291 }
292 return r0, r1
293}
294
295// MockSource_Workspaces_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Workspaces'
296type MockSource_Workspaces_Call struct {
297 *mock.Call
298}
299
300// Workspaces is a helper method to define mock.On call
301// - context1 context.Context
302func (_e *MockSource_Expecter) Workspaces(context1 any) *MockSource_Workspaces_Call {
303 return &MockSource_Workspaces_Call{Call: _e.mock.On("Workspaces", context1)}
304}
305
306func (_c *MockSource_Workspaces_Call) Run(run func(context1 context.Context)) *MockSource_Workspaces_Call {
307 _c.Call.Run(func(args mock.Arguments) {
308 var arg0 context.Context
309 if args[0] != nil {
310 arg0 = args[0].(context.Context)
311 }
312 run(
313 arg0,
314 )
315 })
316 return _c
317}
318
319func (_c *MockSource_Workspaces_Call) Return(workspaces []ports.Workspace, err error) *MockSource_Workspaces_Call {
320 _c.Call.Return(workspaces, err)
321 return _c
322}
323
324func (_c *MockSource_Workspaces_Call) RunAndReturn(run func(context1 context.Context) ([]ports.Workspace, error)) *MockSource_Workspaces_Call {
325 _c.Call.Return(run)
326 return _c
327}
328
329// NewMockScreenshotWriter creates a new instance of MockScreenshotWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
330// The first argument is typically a *testing.T value.
331func NewMockScreenshotWriter(t interface {
332 mock.TestingT
333 Cleanup(func())
334}) *MockScreenshotWriter {
335 if helper, ok := t.(interface{ Helper() }); ok {
336 helper.Helper()
337 }
338
339 mock := &MockScreenshotWriter{}
340 mock.Mock.Test(t)
341
342 t.Cleanup(func() {
343 if helper, ok := t.(interface{ Helper() }); ok {
344 helper.Helper()
345 }
346 mock.AssertExpectations(t)
347 })
348
349 return mock
350}
351
352// MockScreenshotWriter is an autogenerated mock type for the ScreenshotWriter type
353type MockScreenshotWriter struct {
354 mock.Mock
355}
356
357type MockScreenshotWriter_Expecter struct {
358 mock *mock.Mock
359}
360
361func (_m *MockScreenshotWriter) EXPECT() *MockScreenshotWriter_Expecter {
362 return &MockScreenshotWriter_Expecter{mock: &_m.Mock}
363}
364
365// Encode provides a mock function for the type MockScreenshotWriter
366func (_mock *MockScreenshotWriter) Encode(context1 context.Context, writer io.Writer, frame ports.Frame) error {
367 ret := _mock.Called(context1, writer, frame)
368
369 if len(ret) == 0 {
370 panic("no return value specified for Encode")
371 }
372
373 var r0 error
374 if returnFunc, ok := ret.Get(0).(func(context.Context, io.Writer, ports.Frame) error); ok {
375 r0 = returnFunc(context1, writer, frame)
376 } else {
377 r0 = ret.Error(0)
378 }
379 return r0
380}
381
382// MockScreenshotWriter_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode'
383type MockScreenshotWriter_Encode_Call struct {
384 *mock.Call
385}
386
387// Encode is a helper method to define mock.On call
388// - context1 context.Context
389// - writer io.Writer
390// - frame ports.Frame
391func (_e *MockScreenshotWriter_Expecter) Encode(context1 any, writer any, frame any) *MockScreenshotWriter_Encode_Call {
392 return &MockScreenshotWriter_Encode_Call{Call: _e.mock.On("Encode", context1, writer, frame)}
393}
394
395func (_c *MockScreenshotWriter_Encode_Call) Run(run func(context1 context.Context, writer io.Writer, frame ports.Frame)) *MockScreenshotWriter_Encode_Call {
396 _c.Call.Run(func(args mock.Arguments) {
397 var arg0 context.Context
398 if args[0] != nil {
399 arg0 = args[0].(context.Context)
400 }
401 var arg1 io.Writer
402 if args[1] != nil {
403 arg1 = args[1].(io.Writer)
404 }
405 var arg2 ports.Frame
406 if args[2] != nil {
407 arg2 = args[2].(ports.Frame)
408 }
409 run(
410 arg0,
411 arg1,
412 arg2,
413 )
414 })
415 return _c
416}
417
418func (_c *MockScreenshotWriter_Encode_Call) Return(err error) *MockScreenshotWriter_Encode_Call {
419 _c.Call.Return(err)
420 return _c
421}
422
423func (_c *MockScreenshotWriter_Encode_Call) RunAndReturn(run func(context1 context.Context, writer io.Writer, frame ports.Frame) error) *MockScreenshotWriter_Encode_Call {
424 _c.Call.Return(run)
425 return _c
426}
427
428// Save provides a mock function for the type MockScreenshotWriter
429func (_mock *MockScreenshotWriter) Save(context1 context.Context, frame ports.Frame, s string) error {
430 ret := _mock.Called(context1, frame, s)
431
432 if len(ret) == 0 {
433 panic("no return value specified for Save")
434 }
435
436 var r0 error
437 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.Frame, string) error); ok {
438 r0 = returnFunc(context1, frame, s)
439 } else {
440 r0 = ret.Error(0)
441 }
442 return r0
443}
444
445// MockScreenshotWriter_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
446type MockScreenshotWriter_Save_Call struct {
447 *mock.Call
448}
449
450// Save is a helper method to define mock.On call
451// - context1 context.Context
452// - frame ports.Frame
453// - s string
454func (_e *MockScreenshotWriter_Expecter) Save(context1 any, frame any, s any) *MockScreenshotWriter_Save_Call {
455 return &MockScreenshotWriter_Save_Call{Call: _e.mock.On("Save", context1, frame, s)}
456}
457
458func (_c *MockScreenshotWriter_Save_Call) Run(run func(context1 context.Context, frame ports.Frame, s string)) *MockScreenshotWriter_Save_Call {
459 _c.Call.Run(func(args mock.Arguments) {
460 var arg0 context.Context
461 if args[0] != nil {
462 arg0 = args[0].(context.Context)
463 }
464 var arg1 ports.Frame
465 if args[1] != nil {
466 arg1 = args[1].(ports.Frame)
467 }
468 var arg2 string
469 if args[2] != nil {
470 arg2 = args[2].(string)
471 }
472 run(
473 arg0,
474 arg1,
475 arg2,
476 )
477 })
478 return _c
479}
480
481func (_c *MockScreenshotWriter_Save_Call) Return(err error) *MockScreenshotWriter_Save_Call {
482 _c.Call.Return(err)
483 return _c
484}
485
486func (_c *MockScreenshotWriter_Save_Call) RunAndReturn(run func(context1 context.Context, frame ports.Frame, s string) error) *MockScreenshotWriter_Save_Call {
487 _c.Call.Return(run)
488 return _c
489}
490
491// NewMockClipboard creates a new instance of MockClipboard. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
492// The first argument is typically a *testing.T value.
493func NewMockClipboard(t interface {
494 mock.TestingT
495 Cleanup(func())
496}) *MockClipboard {
497 if helper, ok := t.(interface{ Helper() }); ok {
498 helper.Helper()
499 }
500
501 mock := &MockClipboard{}
502 mock.Mock.Test(t)
503
504 t.Cleanup(func() {
505 if helper, ok := t.(interface{ Helper() }); ok {
506 helper.Helper()
507 }
508 mock.AssertExpectations(t)
509 })
510
511 return mock
512}
513
514// MockClipboard is an autogenerated mock type for the Clipboard type
515type MockClipboard struct {
516 mock.Mock
517}
518
519type MockClipboard_Expecter struct {
520 mock *mock.Mock
521}
522
523func (_m *MockClipboard) EXPECT() *MockClipboard_Expecter {
524 return &MockClipboard_Expecter{mock: &_m.Mock}
525}
526
527// Copy provides a mock function for the type MockClipboard
528func (_mock *MockClipboard) Copy(context1 context.Context, reader io.Reader) error {
529 ret := _mock.Called(context1, reader)
530
531 if len(ret) == 0 {
532 panic("no return value specified for Copy")
533 }
534
535 var r0 error
536 if returnFunc, ok := ret.Get(0).(func(context.Context, io.Reader) error); ok {
537 r0 = returnFunc(context1, reader)
538 } else {
539 r0 = ret.Error(0)
540 }
541 return r0
542}
543
544// MockClipboard_Copy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Copy'
545type MockClipboard_Copy_Call struct {
546 *mock.Call
547}
548
549// Copy is a helper method to define mock.On call
550// - context1 context.Context
551// - reader io.Reader
552func (_e *MockClipboard_Expecter) Copy(context1 any, reader any) *MockClipboard_Copy_Call {
553 return &MockClipboard_Copy_Call{Call: _e.mock.On("Copy", context1, reader)}
554}
555
556func (_c *MockClipboard_Copy_Call) Run(run func(context1 context.Context, reader io.Reader)) *MockClipboard_Copy_Call {
557 _c.Call.Run(func(args mock.Arguments) {
558 var arg0 context.Context
559 if args[0] != nil {
560 arg0 = args[0].(context.Context)
561 }
562 var arg1 io.Reader
563 if args[1] != nil {
564 arg1 = args[1].(io.Reader)
565 }
566 run(
567 arg0,
568 arg1,
569 )
570 })
571 return _c
572}
573
574func (_c *MockClipboard_Copy_Call) Return(err error) *MockClipboard_Copy_Call {
575 _c.Call.Return(err)
576 return _c
577}
578
579func (_c *MockClipboard_Copy_Call) RunAndReturn(run func(context1 context.Context, reader io.Reader) error) *MockClipboard_Copy_Call {
580 _c.Call.Return(run)
581 return _c
582}
583
584// NewMockVideoWriter creates a new instance of MockVideoWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
585// The first argument is typically a *testing.T value.
586func NewMockVideoWriter(t interface {
587 mock.TestingT
588 Cleanup(func())
589}) *MockVideoWriter {
590 if helper, ok := t.(interface{ Helper() }); ok {
591 helper.Helper()
592 }
593
594 mock := &MockVideoWriter{}
595 mock.Mock.Test(t)
596
597 t.Cleanup(func() {
598 if helper, ok := t.(interface{ Helper() }); ok {
599 helper.Helper()
600 }
601 mock.AssertExpectations(t)
602 })
603
604 return mock
605}
606
607// MockVideoWriter is an autogenerated mock type for the VideoWriter type
608type MockVideoWriter struct {
609 mock.Mock
610}
611
612type MockVideoWriter_Expecter struct {
613 mock *mock.Mock
614}
615
616func (_m *MockVideoWriter) EXPECT() *MockVideoWriter_Expecter {
617 return &MockVideoWriter_Expecter{mock: &_m.Mock}
618}
619
620// Abort provides a mock function for the type MockVideoWriter
621func (_mock *MockVideoWriter) Abort() error {
622 ret := _mock.Called()
623
624 if len(ret) == 0 {
625 panic("no return value specified for Abort")
626 }
627
628 var r0 error
629 if returnFunc, ok := ret.Get(0).(func() error); ok {
630 r0 = returnFunc()
631 } else {
632 r0 = ret.Error(0)
633 }
634 return r0
635}
636
637// MockVideoWriter_Abort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Abort'
638type MockVideoWriter_Abort_Call struct {
639 *mock.Call
640}
641
642// Abort is a helper method to define mock.On call
643func (_e *MockVideoWriter_Expecter) Abort() *MockVideoWriter_Abort_Call {
644 return &MockVideoWriter_Abort_Call{Call: _e.mock.On("Abort")}
645}
646
647func (_c *MockVideoWriter_Abort_Call) Run(run func()) *MockVideoWriter_Abort_Call {
648 _c.Call.Run(func(args mock.Arguments) {
649 run()
650 })
651 return _c
652}
653
654func (_c *MockVideoWriter_Abort_Call) Return(err error) *MockVideoWriter_Abort_Call {
655 _c.Call.Return(err)
656 return _c
657}
658
659func (_c *MockVideoWriter_Abort_Call) RunAndReturn(run func() error) *MockVideoWriter_Abort_Call {
660 _c.Call.Return(run)
661 return _c
662}
663
664// Close provides a mock function for the type MockVideoWriter
665func (_mock *MockVideoWriter) Close() error {
666 ret := _mock.Called()
667
668 if len(ret) == 0 {
669 panic("no return value specified for Close")
670 }
671
672 var r0 error
673 if returnFunc, ok := ret.Get(0).(func() error); ok {
674 r0 = returnFunc()
675 } else {
676 r0 = ret.Error(0)
677 }
678 return r0
679}
680
681// MockVideoWriter_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
682type MockVideoWriter_Close_Call struct {
683 *mock.Call
684}
685
686// Close is a helper method to define mock.On call
687func (_e *MockVideoWriter_Expecter) Close() *MockVideoWriter_Close_Call {
688 return &MockVideoWriter_Close_Call{Call: _e.mock.On("Close")}
689}
690
691func (_c *MockVideoWriter_Close_Call) Run(run func()) *MockVideoWriter_Close_Call {
692 _c.Call.Run(func(args mock.Arguments) {
693 run()
694 })
695 return _c
696}
697
698func (_c *MockVideoWriter_Close_Call) Return(err error) *MockVideoWriter_Close_Call {
699 _c.Call.Return(err)
700 return _c
701}
702
703func (_c *MockVideoWriter_Close_Call) RunAndReturn(run func() error) *MockVideoWriter_Close_Call {
704 _c.Call.Return(run)
705 return _c
706}
707
708// Start provides a mock function for the type MockVideoWriter
709func (_mock *MockVideoWriter) Start(context1 context.Context, frame ports.Frame, s string, videoSettings ports.VideoSettings) error {
710 ret := _mock.Called(context1, frame, s, videoSettings)
711
712 if len(ret) == 0 {
713 panic("no return value specified for Start")
714 }
715
716 var r0 error
717 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.Frame, string, ports.VideoSettings) error); ok {
718 r0 = returnFunc(context1, frame, s, videoSettings)
719 } else {
720 r0 = ret.Error(0)
721 }
722 return r0
723}
724
725// MockVideoWriter_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
726type MockVideoWriter_Start_Call struct {
727 *mock.Call
728}
729
730// Start is a helper method to define mock.On call
731// - context1 context.Context
732// - frame ports.Frame
733// - s string
734// - videoSettings ports.VideoSettings
735func (_e *MockVideoWriter_Expecter) Start(context1 any, frame any, s any, videoSettings any) *MockVideoWriter_Start_Call {
736 return &MockVideoWriter_Start_Call{Call: _e.mock.On("Start", context1, frame, s, videoSettings)}
737}
738
739func (_c *MockVideoWriter_Start_Call) Run(run func(context1 context.Context, frame ports.Frame, s string, videoSettings ports.VideoSettings)) *MockVideoWriter_Start_Call {
740 _c.Call.Run(func(args mock.Arguments) {
741 var arg0 context.Context
742 if args[0] != nil {
743 arg0 = args[0].(context.Context)
744 }
745 var arg1 ports.Frame
746 if args[1] != nil {
747 arg1 = args[1].(ports.Frame)
748 }
749 var arg2 string
750 if args[2] != nil {
751 arg2 = args[2].(string)
752 }
753 var arg3 ports.VideoSettings
754 if args[3] != nil {
755 arg3 = args[3].(ports.VideoSettings)
756 }
757 run(
758 arg0,
759 arg1,
760 arg2,
761 arg3,
762 )
763 })
764 return _c
765}
766
767func (_c *MockVideoWriter_Start_Call) Return(err error) *MockVideoWriter_Start_Call {
768 _c.Call.Return(err)
769 return _c
770}
771
772func (_c *MockVideoWriter_Start_Call) RunAndReturn(run func(context1 context.Context, frame ports.Frame, s string, videoSettings ports.VideoSettings) error) *MockVideoWriter_Start_Call {
773 _c.Call.Return(run)
774 return _c
775}
776
777// Write provides a mock function for the type MockVideoWriter
778func (_mock *MockVideoWriter) Write(context1 context.Context, frame ports.Frame) error {
779 ret := _mock.Called(context1, frame)
780
781 if len(ret) == 0 {
782 panic("no return value specified for Write")
783 }
784
785 var r0 error
786 if returnFunc, ok := ret.Get(0).(func(context.Context, ports.Frame) error); ok {
787 r0 = returnFunc(context1, frame)
788 } else {
789 r0 = ret.Error(0)
790 }
791 return r0
792}
793
794// MockVideoWriter_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'
795type MockVideoWriter_Write_Call struct {
796 *mock.Call
797}
798
799// Write is a helper method to define mock.On call
800// - context1 context.Context
801// - frame ports.Frame
802func (_e *MockVideoWriter_Expecter) Write(context1 any, frame any) *MockVideoWriter_Write_Call {
803 return &MockVideoWriter_Write_Call{Call: _e.mock.On("Write", context1, frame)}
804}
805
806func (_c *MockVideoWriter_Write_Call) Run(run func(context1 context.Context, frame ports.Frame)) *MockVideoWriter_Write_Call {
807 _c.Call.Run(func(args mock.Arguments) {
808 var arg0 context.Context
809 if args[0] != nil {
810 arg0 = args[0].(context.Context)
811 }
812 var arg1 ports.Frame
813 if args[1] != nil {
814 arg1 = args[1].(ports.Frame)
815 }
816 run(
817 arg0,
818 arg1,
819 )
820 })
821 return _c
822}
823
824func (_c *MockVideoWriter_Write_Call) Return(err error) *MockVideoWriter_Write_Call {
825 _c.Call.Return(err)
826 return _c
827}
828
829func (_c *MockVideoWriter_Write_Call) RunAndReturn(run func(context1 context.Context, frame ports.Frame) error) *MockVideoWriter_Write_Call {
830 _c.Call.Return(run)
831 return _c
832}
833
834// NewMockSelector creates a new instance of MockSelector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
835// The first argument is typically a *testing.T value.
836func NewMockSelector(t interface {
837 mock.TestingT
838 Cleanup(func())
839}) *MockSelector {
840 if helper, ok := t.(interface{ Helper() }); ok {
841 helper.Helper()
842 }
843
844 mock := &MockSelector{}
845 mock.Mock.Test(t)
846
847 t.Cleanup(func() {
848 if helper, ok := t.(interface{ Helper() }); ok {
849 helper.Helper()
850 }
851 mock.AssertExpectations(t)
852 })
853
854 return mock
855}
856
857// MockSelector is an autogenerated mock type for the Selector type
858type MockSelector struct {
859 mock.Mock
860}
861
862type MockSelector_Expecter struct {
863 mock *mock.Mock
864}
865
866func (_m *MockSelector) EXPECT() *MockSelector_Expecter {
867 return &MockSelector_Expecter{mock: &_m.Mock}
868}
869
870// Select provides a mock function for the type MockSelector
871func (_mock *MockSelector) Select(context1 context.Context, outputs []ports.Output) (ports.Selection, bool, error) {
872 ret := _mock.Called(context1, outputs)
873
874 if len(ret) == 0 {
875 panic("no return value specified for Select")
876 }
877
878 var r0 ports.Selection
879 var r1 bool
880 var r2 error
881 if returnFunc, ok := ret.Get(0).(func(context.Context, []ports.Output) (ports.Selection, bool, error)); ok {
882 return returnFunc(context1, outputs)
883 }
884 if returnFunc, ok := ret.Get(0).(func(context.Context, []ports.Output) ports.Selection); ok {
885 r0 = returnFunc(context1, outputs)
886 } else {
887 r0 = ret.Get(0).(ports.Selection)
888 }
889 if returnFunc, ok := ret.Get(1).(func(context.Context, []ports.Output) bool); ok {
890 r1 = returnFunc(context1, outputs)
891 } else {
892 r1 = ret.Get(1).(bool)
893 }
894 if returnFunc, ok := ret.Get(2).(func(context.Context, []ports.Output) error); ok {
895 r2 = returnFunc(context1, outputs)
896 } else {
897 r2 = ret.Error(2)
898 }
899 return r0, r1, r2
900}
901
902// MockSelector_Select_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Select'
903type MockSelector_Select_Call struct {
904 *mock.Call
905}
906
907// Select is a helper method to define mock.On call
908// - context1 context.Context
909// - outputs []ports.Output
910func (_e *MockSelector_Expecter) Select(context1 any, outputs any) *MockSelector_Select_Call {
911 return &MockSelector_Select_Call{Call: _e.mock.On("Select", context1, outputs)}
912}
913
914func (_c *MockSelector_Select_Call) Run(run func(context1 context.Context, outputs []ports.Output)) *MockSelector_Select_Call {
915 _c.Call.Run(func(args mock.Arguments) {
916 var arg0 context.Context
917 if args[0] != nil {
918 arg0 = args[0].(context.Context)
919 }
920 var arg1 []ports.Output
921 if args[1] != nil {
922 arg1 = args[1].([]ports.Output)
923 }
924 run(
925 arg0,
926 arg1,
927 )
928 })
929 return _c
930}
931
932func (_c *MockSelector_Select_Call) Return(selection ports.Selection, b bool, err error) *MockSelector_Select_Call {
933 _c.Call.Return(selection, b, err)
934 return _c
935}
936
937func (_c *MockSelector_Select_Call) RunAndReturn(run func(context1 context.Context, outputs []ports.Output) (ports.Selection, bool, error)) *MockSelector_Select_Call {
938 _c.Call.Return(run)
939 return _c
940}