// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package text import ( "io" mock "github.com/stretchr/testify/mock" ) // NewMockLazySource creates a new instance of MockLazySource. 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 NewMockLazySource(t interface { mock.TestingT Cleanup(func()) }) *MockLazySource { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockLazySource{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockLazySource is an autogenerated mock type for the LazySource type type MockLazySource struct { mock.Mock } type MockLazySource_Expecter struct { mock *mock.Mock } func (_m *MockLazySource) EXPECT() *MockLazySource_Expecter { return &MockLazySource_Expecter{mock: &_m.Mock} } // Fonts provides a mock function for the type MockLazySource func (_mock *MockLazySource) Fonts() (map[string][]byte, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Fonts") } var r0 map[string][]byte var r1 error if returnFunc, ok := ret.Get(0).(func() (map[string][]byte, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() map[string][]byte); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).(map[string][]byte) } } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockLazySource_Fonts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fonts' type MockLazySource_Fonts_Call struct { *mock.Call } // Fonts is a helper method to define mock.On call func (_e *MockLazySource_Expecter) Fonts() *MockLazySource_Fonts_Call { return &MockLazySource_Fonts_Call{Call: _e.mock.On("Fonts")} } func (_c *MockLazySource_Fonts_Call) Run(run func()) *MockLazySource_Fonts_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockLazySource_Fonts_Call) Return(stringToBytes map[string][]byte, err error) *MockLazySource_Fonts_Call { _c.Call.Return(stringToBytes, err) return _c } func (_c *MockLazySource_Fonts_Call) RunAndReturn(run func() (map[string][]byte, error)) *MockLazySource_Fonts_Call { _c.Call.Return(run) return _c } // Index provides a mock function for the type MockLazySource func (_mock *MockLazySource) Index() ([]FontFile, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Index") } var r0 []FontFile var r1 error if returnFunc, ok := ret.Get(0).(func() ([]FontFile, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() []FontFile); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]FontFile) } } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockLazySource_Index_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Index' type MockLazySource_Index_Call struct { *mock.Call } // Index is a helper method to define mock.On call func (_e *MockLazySource_Expecter) Index() *MockLazySource_Index_Call { return &MockLazySource_Index_Call{Call: _e.mock.On("Index")} } func (_c *MockLazySource_Index_Call) Run(run func()) *MockLazySource_Index_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockLazySource_Index_Call) Return(fontFiles []FontFile, err error) *MockLazySource_Index_Call { _c.Call.Return(fontFiles, err) return _c } func (_c *MockLazySource_Index_Call) RunAndReturn(run func() ([]FontFile, error)) *MockLazySource_Index_Call { _c.Call.Return(run) return _c } // IndexFiles provides a mock function for the type MockLazySource func (_mock *MockLazySource) IndexFiles(paths []string) ([]FontFile, error) { ret := _mock.Called(paths) if len(ret) == 0 { panic("no return value specified for IndexFiles") } var r0 []FontFile var r1 error if returnFunc, ok := ret.Get(0).(func([]string) ([]FontFile, error)); ok { return returnFunc(paths) } if returnFunc, ok := ret.Get(0).(func([]string) []FontFile); ok { r0 = returnFunc(paths) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]FontFile) } } if returnFunc, ok := ret.Get(1).(func([]string) error); ok { r1 = returnFunc(paths) } else { r1 = ret.Error(1) } return r0, r1 } // MockLazySource_IndexFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexFiles' type MockLazySource_IndexFiles_Call struct { *mock.Call } // IndexFiles is a helper method to define mock.On call // - paths []string func (_e *MockLazySource_Expecter) IndexFiles(paths any) *MockLazySource_IndexFiles_Call { return &MockLazySource_IndexFiles_Call{Call: _e.mock.On("IndexFiles", paths)} } func (_c *MockLazySource_IndexFiles_Call) Run(run func(paths []string)) *MockLazySource_IndexFiles_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 []string if args[0] != nil { arg0 = args[0].([]string) } run( arg0, ) }) return _c } func (_c *MockLazySource_IndexFiles_Call) Return(fontFiles []FontFile, err error) *MockLazySource_IndexFiles_Call { _c.Call.Return(fontFiles, err) return _c } func (_c *MockLazySource_IndexFiles_Call) RunAndReturn(run func(paths []string) ([]FontFile, error)) *MockLazySource_IndexFiles_Call { _c.Call.Return(run) return _c } // Open provides a mock function for the type MockLazySource func (_mock *MockLazySource) Open(path string) (io.ReadCloser, error) { ret := _mock.Called(path) if len(ret) == 0 { panic("no return value specified for Open") } var r0 io.ReadCloser var r1 error if returnFunc, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok { return returnFunc(path) } if returnFunc, ok := ret.Get(0).(func(string) io.ReadCloser); ok { r0 = returnFunc(path) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(io.ReadCloser) } } if returnFunc, ok := ret.Get(1).(func(string) error); ok { r1 = returnFunc(path) } else { r1 = ret.Error(1) } return r0, r1 } // MockLazySource_Open_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Open' type MockLazySource_Open_Call struct { *mock.Call } // Open is a helper method to define mock.On call // - path string func (_e *MockLazySource_Expecter) Open(path any) *MockLazySource_Open_Call { return &MockLazySource_Open_Call{Call: _e.mock.On("Open", path)} } func (_c *MockLazySource_Open_Call) Run(run func(path string)) *MockLazySource_Open_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 string if args[0] != nil { arg0 = args[0].(string) } run( arg0, ) }) return _c } func (_c *MockLazySource_Open_Call) Return(readCloser io.ReadCloser, err error) *MockLazySource_Open_Call { _c.Call.Return(readCloser, err) return _c } func (_c *MockLazySource_Open_Call) RunAndReturn(run func(path string) (io.ReadCloser, error)) *MockLazySource_Open_Call { _c.Call.Return(run) return _c } // Paths provides a mock function for the type MockLazySource func (_mock *MockLazySource) Paths() ([]string, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for Paths") } var r0 []string var r1 error if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() []string); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]string) } } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // MockLazySource_Paths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Paths' type MockLazySource_Paths_Call struct { *mock.Call } // Paths is a helper method to define mock.On call func (_e *MockLazySource_Expecter) Paths() *MockLazySource_Paths_Call { return &MockLazySource_Paths_Call{Call: _e.mock.On("Paths")} } func (_c *MockLazySource_Paths_Call) Run(run func()) *MockLazySource_Paths_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockLazySource_Paths_Call) Return(strings []string, err error) *MockLazySource_Paths_Call { _c.Call.Return(strings, err) return _c } func (_c *MockLazySource_Paths_Call) RunAndReturn(run func() ([]string, error)) *MockLazySource_Paths_Call { _c.Call.Return(run) return _c }