// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "github.com/bnema/dumber/internal/application/port" mock "github.com/stretchr/testify/mock" ) // 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. // The first argument is typically a *testing.T value. func NewMockFontDetector(t interface { mock.TestingT Cleanup(func()) }) *MockFontDetector { mock := &MockFontDetector{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockFontDetector is an autogenerated mock type for the FontDetector type type MockFontDetector struct { mock.Mock } type MockFontDetector_Expecter struct { mock *mock.Mock } func (_m *MockFontDetector) EXPECT() *MockFontDetector_Expecter { return &MockFontDetector_Expecter{mock: &_m.Mock} } // GetAvailableFonts provides a mock function for the type MockFontDetector func (_mock *MockFontDetector) GetAvailableFonts(ctx context.Context) ([]string, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for GetAvailableFonts") } var r0 []string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // MockFontDetector_GetAvailableFonts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAvailableFonts' type MockFontDetector_GetAvailableFonts_Call struct { *mock.Call } // GetAvailableFonts is a helper method to define mock.On call // - ctx context.Context func (_e *MockFontDetector_Expecter) GetAvailableFonts(ctx any) *MockFontDetector_GetAvailableFonts_Call { return &MockFontDetector_GetAvailableFonts_Call{Call: _e.mock.On("GetAvailableFonts", ctx)} } func (_c *MockFontDetector_GetAvailableFonts_Call) Run(run func(ctx context.Context)) *MockFontDetector_GetAvailableFonts_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockFontDetector_GetAvailableFonts_Call) Return(strings []string, err error) *MockFontDetector_GetAvailableFonts_Call { _c.Call.Return(strings, err) return _c } func (_c *MockFontDetector_GetAvailableFonts_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockFontDetector_GetAvailableFonts_Call { _c.Call.Return(run) return _c } // IsAvailable provides a mock function for the type MockFontDetector func (_mock *MockFontDetector) IsAvailable(ctx context.Context) bool { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for IsAvailable") } var r0 bool if returnFunc, ok := ret.Get(0).(func(context.Context) bool); ok { r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(bool) } return r0 } // MockFontDetector_IsAvailable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAvailable' type MockFontDetector_IsAvailable_Call struct { *mock.Call } // IsAvailable is a helper method to define mock.On call // - ctx context.Context func (_e *MockFontDetector_Expecter) IsAvailable(ctx any) *MockFontDetector_IsAvailable_Call { return &MockFontDetector_IsAvailable_Call{Call: _e.mock.On("IsAvailable", ctx)} } func (_c *MockFontDetector_IsAvailable_Call) Run(run func(ctx context.Context)) *MockFontDetector_IsAvailable_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockFontDetector_IsAvailable_Call) Return(b bool) *MockFontDetector_IsAvailable_Call { _c.Call.Return(b) return _c } func (_c *MockFontDetector_IsAvailable_Call) RunAndReturn(run func(ctx context.Context) bool) *MockFontDetector_IsAvailable_Call { _c.Call.Return(run) return _c } // SelectBestFont provides a mock function for the type MockFontDetector func (_mock *MockFontDetector) SelectBestFont(ctx context.Context, category port.FontCategory, fallbackChain []string) string { ret := _mock.Called(ctx, category, fallbackChain) if len(ret) == 0 { panic("no return value specified for SelectBestFont") } var r0 string if returnFunc, ok := ret.Get(0).(func(context.Context, port.FontCategory, []string) string); ok { r0 = returnFunc(ctx, category, fallbackChain) } else { r0 = ret.Get(0).(string) } return r0 } // MockFontDetector_SelectBestFont_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectBestFont' type MockFontDetector_SelectBestFont_Call struct { *mock.Call } // SelectBestFont is a helper method to define mock.On call // - ctx context.Context // - category port.FontCategory // - fallbackChain []string func (_e *MockFontDetector_Expecter) SelectBestFont(ctx any, category any, fallbackChain any) *MockFontDetector_SelectBestFont_Call { return &MockFontDetector_SelectBestFont_Call{Call: _e.mock.On("SelectBestFont", ctx, category, fallbackChain)} } func (_c *MockFontDetector_SelectBestFont_Call) Run(run func(ctx context.Context, category port.FontCategory, fallbackChain []string)) *MockFontDetector_SelectBestFont_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 port.FontCategory if args[1] != nil { arg1 = args[1].(port.FontCategory) } var arg2 []string if args[2] != nil { arg2 = args[2].([]string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *MockFontDetector_SelectBestFont_Call) Return(s string) *MockFontDetector_SelectBestFont_Call { _c.Call.Return(s) return _c } func (_c *MockFontDetector_SelectBestFont_Call) RunAndReturn(run func(ctx context.Context, category port.FontCategory, fallbackChain []string) string) *MockFontDetector_SelectBestFont_Call { _c.Call.Return(run) return _c }