1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package hints
6
7import (
8 "context"
9
10 "github.com/bnema/neferwl/internal/ports"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// newMocktargetSource creates a new instance of mocktargetSource. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func newMocktargetSource(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *mocktargetSource {
20 if helper, ok := t.(interface{ Helper() }); ok {
21 helper.Helper()
22 }
23
24 mock := &mocktargetSource{}
25 mock.Mock.Test(t)
26
27 t.Cleanup(func() {
28 if helper, ok := t.(interface{ Helper() }); ok {
29 helper.Helper()
30 }
31 mock.AssertExpectations(t)
32 })
33
34 return mock
35}
36
37// mocktargetSource is an autogenerated mock type for the targetSource type
38type mocktargetSource struct {
39 mock.Mock
40}
41
42type mocktargetSource_Expecter struct {
43 mock *mock.Mock
44}
45
46func (_m *mocktargetSource) EXPECT() *mocktargetSource_Expecter {
47 return &mocktargetSource_Expecter{mock: &_m.Mock}
48}
49
50// Close provides a mock function for the type mocktargetSource
51func (_mock *mocktargetSource) Close() error {
52 ret := _mock.Called()
53
54 if len(ret) == 0 {
55 panic("no return value specified for Close")
56 }
57
58 var r0 error
59 if returnFunc, ok := ret.Get(0).(func() error); ok {
60 r0 = returnFunc()
61 } else {
62 r0 = ret.Error(0)
63 }
64 return r0
65}
66
67// mocktargetSource_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
68type mocktargetSource_Close_Call struct {
69 *mock.Call
70}
71
72// Close is a helper method to define mock.On call
73func (_e *mocktargetSource_Expecter) Close() *mocktargetSource_Close_Call {
74 return &mocktargetSource_Close_Call{Call: _e.mock.On("Close")}
75}
76
77func (_c *mocktargetSource_Close_Call) Run(run func()) *mocktargetSource_Close_Call {
78 _c.Call.Run(func(args mock.Arguments) {
79 run()
80 })
81 return _c
82}
83
84func (_c *mocktargetSource_Close_Call) Return(err error) *mocktargetSource_Close_Call {
85 _c.Call.Return(err)
86 return _c
87}
88
89func (_c *mocktargetSource_Close_Call) RunAndReturn(run func() error) *mocktargetSource_Close_Call {
90 _c.Call.Return(run)
91 return _c
92}
93
94// Targets provides a mock function for the type mocktargetSource
95func (_mock *mocktargetSource) Targets(ctx context.Context, windows []ports.HintWindow, linksOnly bool) ([]ports.HintTarget, map[ports.WindowID]bool, error) {
96 ret := _mock.Called(ctx, windows, linksOnly)
97
98 if len(ret) == 0 {
99 panic("no return value specified for Targets")
100 }
101
102 var r0 []ports.HintTarget
103 var r1 map[ports.WindowID]bool
104 var r2 error
105 if returnFunc, ok := ret.Get(0).(func(context.Context, []ports.HintWindow, bool) ([]ports.HintTarget, map[ports.WindowID]bool, error)); ok {
106 return returnFunc(ctx, windows, linksOnly)
107 }
108 if returnFunc, ok := ret.Get(0).(func(context.Context, []ports.HintWindow, bool) []ports.HintTarget); ok {
109 r0 = returnFunc(ctx, windows, linksOnly)
110 } else {
111 if ret.Get(0) != nil {
112 r0 = ret.Get(0).([]ports.HintTarget)
113 }
114 }
115 if returnFunc, ok := ret.Get(1).(func(context.Context, []ports.HintWindow, bool) map[ports.WindowID]bool); ok {
116 r1 = returnFunc(ctx, windows, linksOnly)
117 } else {
118 if ret.Get(1) != nil {
119 r1 = ret.Get(1).(map[ports.WindowID]bool)
120 }
121 }
122 if returnFunc, ok := ret.Get(2).(func(context.Context, []ports.HintWindow, bool) error); ok {
123 r2 = returnFunc(ctx, windows, linksOnly)
124 } else {
125 r2 = ret.Error(2)
126 }
127 return r0, r1, r2
128}
129
130// mocktargetSource_Targets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Targets'
131type mocktargetSource_Targets_Call struct {
132 *mock.Call
133}
134
135// Targets is a helper method to define mock.On call
136// - ctx context.Context
137// - windows []ports.HintWindow
138// - linksOnly bool
139func (_e *mocktargetSource_Expecter) Targets(ctx any, windows any, linksOnly any) *mocktargetSource_Targets_Call {
140 return &mocktargetSource_Targets_Call{Call: _e.mock.On("Targets", ctx, windows, linksOnly)}
141}
142
143func (_c *mocktargetSource_Targets_Call) Run(run func(ctx context.Context, windows []ports.HintWindow, linksOnly bool)) *mocktargetSource_Targets_Call {
144 _c.Call.Run(func(args mock.Arguments) {
145 var arg0 context.Context
146 if args[0] != nil {
147 arg0 = args[0].(context.Context)
148 }
149 var arg1 []ports.HintWindow
150 if args[1] != nil {
151 arg1 = args[1].([]ports.HintWindow)
152 }
153 var arg2 bool
154 if args[2] != nil {
155 arg2 = args[2].(bool)
156 }
157 run(
158 arg0,
159 arg1,
160 arg2,
161 )
162 })
163 return _c
164}
165
166func (_c *mocktargetSource_Targets_Call) Return(hintTargets []ports.HintTarget, windowIDToBool map[ports.WindowID]bool, err error) *mocktargetSource_Targets_Call {
167 _c.Call.Return(hintTargets, windowIDToBool, err)
168 return _c
169}
170
171func (_c *mocktargetSource_Targets_Call) RunAndReturn(run func(ctx context.Context, windows []ports.HintWindow, linksOnly bool) ([]ports.HintTarget, map[ports.WindowID]bool, error)) *mocktargetSource_Targets_Call {
172 _c.Call.Return(run)
173 return _c
174}