1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 "github.com/bnema/dumber/internal/application/port"
11 mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockFontDetector creates a new instance of MockFontDetector. 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 NewMockFontDetector(t interface {
17 mock.TestingT
18 Cleanup(func())
19}) *MockFontDetector {
20 mock := &MockFontDetector{}
21 mock.Mock.Test(t)
22
23 t.Cleanup(func() { mock.AssertExpectations(t) })
24
25 return mock
26}
27
28// MockFontDetector is an autogenerated mock type for the FontDetector type
29type MockFontDetector struct {
30 mock.Mock
31}
32
33type MockFontDetector_Expecter struct {
34 mock *mock.Mock
35}
36
37func (_m *MockFontDetector) EXPECT() *MockFontDetector_Expecter {
38 return &MockFontDetector_Expecter{mock: &_m.Mock}
39}
40
41// GetAvailableFonts provides a mock function for the type MockFontDetector
42func (_mock *MockFontDetector) GetAvailableFonts(ctx context.Context) ([]string, error) {
43 ret := _mock.Called(ctx)
44
45 if len(ret) == 0 {
46 panic("no return value specified for GetAvailableFonts")
47 }
48
49 var r0 []string
50 var r1 error
51 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
52 return returnFunc(ctx)
53 }
54 if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
55 r0 = returnFunc(ctx)
56 } else {
57 if ret.Get(0) != nil {
58 r0 = ret.Get(0).([]string)
59 }
60 }
61 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
62 r1 = returnFunc(ctx)
63 } else {
64 r1 = ret.Error(1)
65 }
66 return r0, r1
67}
68
69// MockFontDetector_GetAvailableFonts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAvailableFonts'
70type MockFontDetector_GetAvailableFonts_Call struct {
71 *mock.Call
72}
73
74// GetAvailableFonts is a helper method to define mock.On call
75// - ctx context.Context
76func (_e *MockFontDetector_Expecter) GetAvailableFonts(ctx any) *MockFontDetector_GetAvailableFonts_Call {
77 return &MockFontDetector_GetAvailableFonts_Call{Call: _e.mock.On("GetAvailableFonts", ctx)}
78}
79
80func (_c *MockFontDetector_GetAvailableFonts_Call) Run(run func(ctx context.Context)) *MockFontDetector_GetAvailableFonts_Call {
81 _c.Call.Run(func(args mock.Arguments) {
82 var arg0 context.Context
83 if args[0] != nil {
84 arg0 = args[0].(context.Context)
85 }
86 run(
87 arg0,
88 )
89 })
90 return _c
91}
92
93func (_c *MockFontDetector_GetAvailableFonts_Call) Return(strings []string, err error) *MockFontDetector_GetAvailableFonts_Call {
94 _c.Call.Return(strings, err)
95 return _c
96}
97
98func (_c *MockFontDetector_GetAvailableFonts_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockFontDetector_GetAvailableFonts_Call {
99 _c.Call.Return(run)
100 return _c
101}
102
103// IsAvailable provides a mock function for the type MockFontDetector
104func (_mock *MockFontDetector) IsAvailable(ctx context.Context) bool {
105 ret := _mock.Called(ctx)
106
107 if len(ret) == 0 {
108 panic("no return value specified for IsAvailable")
109 }
110
111 var r0 bool
112 if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok {
113 r0 = returnFunc(ctx)
114 } else {
115 r0 = ret.Get(0).(bool)
116 }
117 return r0
118}
119
120// MockFontDetector_IsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAvailable'
121type MockFontDetector_IsAvailable_Call struct {
122 *mock.Call
123}
124
125// IsAvailable is a helper method to define mock.On call
126// - ctx context.Context
127func (_e *MockFontDetector_Expecter) IsAvailable(ctx any) *MockFontDetector_IsAvailable_Call {
128 return &MockFontDetector_IsAvailable_Call{Call: _e.mock.On("IsAvailable", ctx)}
129}
130
131func (_c *MockFontDetector_IsAvailable_Call) Run(run func(ctx context.Context)) *MockFontDetector_IsAvailable_Call {
132 _c.Call.Run(func(args mock.Arguments) {
133 var arg0 context.Context
134 if args[0] != nil {
135 arg0 = args[0].(context.Context)
136 }
137 run(
138 arg0,
139 )
140 })
141 return _c
142}
143
144func (_c *MockFontDetector_IsAvailable_Call) Return(b bool) *MockFontDetector_IsAvailable_Call {
145 _c.Call.Return(b)
146 return _c
147}
148
149func (_c *MockFontDetector_IsAvailable_Call) RunAndReturn(run func(ctx context.Context) bool) *MockFontDetector_IsAvailable_Call {
150 _c.Call.Return(run)
151 return _c
152}
153
154// SelectBestFont provides a mock function for the type MockFontDetector
155func (_mock *MockFontDetector) SelectBestFont(ctx context.Context, category port.FontCategory, fallbackChain []string) string {
156 ret := _mock.Called(ctx, category, fallbackChain)
157
158 if len(ret) == 0 {
159 panic("no return value specified for SelectBestFont")
160 }
161
162 var r0 string
163 if returnFunc, ok := ret.Get(0).(func(context.Context, port.FontCategory, []string) string); ok {
164 r0 = returnFunc(ctx, category, fallbackChain)
165 } else {
166 r0 = ret.Get(0).(string)
167 }
168 return r0
169}
170
171// MockFontDetector_SelectBestFont_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectBestFont'
172type MockFontDetector_SelectBestFont_Call struct {
173 *mock.Call
174}
175
176// SelectBestFont is a helper method to define mock.On call
177// - ctx context.Context
178// - category port.FontCategory
179// - fallbackChain []string
180func (_e *MockFontDetector_Expecter) SelectBestFont(ctx any, category any, fallbackChain any) *MockFontDetector_SelectBestFont_Call {
181 return &MockFontDetector_SelectBestFont_Call{Call: _e.mock.On("SelectBestFont", ctx, category, fallbackChain)}
182}
183
184func (_c *MockFontDetector_SelectBestFont_Call) Run(run func(ctx context.Context, category port.FontCategory, fallbackChain []string)) *MockFontDetector_SelectBestFont_Call {
185 _c.Call.Run(func(args mock.Arguments) {
186 var arg0 context.Context
187 if args[0] != nil {
188 arg0 = args[0].(context.Context)
189 }
190 var arg1 port.FontCategory
191 if args[1] != nil {
192 arg1 = args[1].(port.FontCategory)
193 }
194 var arg2 []string
195 if args[2] != nil {
196 arg2 = args[2].([]string)
197 }
198 run(
199 arg0,
200 arg1,
201 arg2,
202 )
203 })
204 return _c
205}
206
207func (_c *MockFontDetector_SelectBestFont_Call) Return(s string) *MockFontDetector_SelectBestFont_Call {
208 _c.Call.Return(s)
209 return _c
210}
211
212func (_c *MockFontDetector_SelectBestFont_Call) RunAndReturn(run func(ctx context.Context, category port.FontCategory, fallbackChain []string) string) *MockFontDetector_SelectBestFont_Call {
213 _c.Call.Return(run)
214 return _c
215}