// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // NewMockFileSystem creates a new instance of MockFileSystem. 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 NewMockFileSystem(t interface { mock.TestingT Cleanup(func()) }) *MockFileSystem { mock := &MockFileSystem{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock } // MockFileSystem is an autogenerated mock type for the FileSystem type type MockFileSystem struct { mock.Mock } type MockFileSystem_Expecter struct { mock *mock.Mock } func (_m *MockFileSystem) EXPECT() *MockFileSystem_Expecter { return &MockFileSystem_Expecter{mock: &_m.Mock} } // Exists provides a mock function for the type MockFileSystem func (_mock *MockFileSystem) Exists(ctx context.Context, path string) (bool, error) { ret := _mock.Called(ctx, path) if len(ret) == 0 { panic("no return value specified for Exists") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { return returnFunc(ctx, path) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = returnFunc(ctx, path) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, path) } else { r1 = ret.Error(1) } return r0, r1 } // MockFileSystem_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' type MockFileSystem_Exists_Call struct { *mock.Call } // Exists is a helper method to define mock.On call // - ctx context.Context // - path string func (_e *MockFileSystem_Expecter) Exists(ctx any, path any) *MockFileSystem_Exists_Call { return &MockFileSystem_Exists_Call{Call: _e.mock.On("Exists", ctx, path)} } func (_c *MockFileSystem_Exists_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_Exists_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockFileSystem_Exists_Call) Return(b bool, err error) *MockFileSystem_Exists_Call { _c.Call.Return(b, err) return _c } func (_c *MockFileSystem_Exists_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_Exists_Call { _c.Call.Return(run) return _c } // GetSize provides a mock function for the type MockFileSystem func (_mock *MockFileSystem) GetSize(ctx context.Context, path string) (int64, error) { ret := _mock.Called(ctx, path) if len(ret) == 0 { panic("no return value specified for GetSize") } var r0 int64 var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok { return returnFunc(ctx, path) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) int64); ok { r0 = returnFunc(ctx, path) } else { r0 = ret.Get(0).(int64) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, path) } else { r1 = ret.Error(1) } return r0, r1 } // MockFileSystem_GetSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSize' type MockFileSystem_GetSize_Call struct { *mock.Call } // GetSize is a helper method to define mock.On call // - ctx context.Context // - path string func (_e *MockFileSystem_Expecter) GetSize(ctx any, path any) *MockFileSystem_GetSize_Call { return &MockFileSystem_GetSize_Call{Call: _e.mock.On("GetSize", ctx, path)} } func (_c *MockFileSystem_GetSize_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_GetSize_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockFileSystem_GetSize_Call) Return(n int64, err error) *MockFileSystem_GetSize_Call { _c.Call.Return(n, err) return _c } func (_c *MockFileSystem_GetSize_Call) RunAndReturn(run func(ctx context.Context, path string) (int64, error)) *MockFileSystem_GetSize_Call { _c.Call.Return(run) return _c } // IsDirectory provides a mock function for the type MockFileSystem func (_mock *MockFileSystem) IsDirectory(ctx context.Context, path string) (bool, error) { ret := _mock.Called(ctx, path) if len(ret) == 0 { panic("no return value specified for IsDirectory") } var r0 bool var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { return returnFunc(ctx, path) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { r0 = returnFunc(ctx, path) } else { r0 = ret.Get(0).(bool) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = returnFunc(ctx, path) } else { r1 = ret.Error(1) } return r0, r1 } // MockFileSystem_IsDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDirectory' type MockFileSystem_IsDirectory_Call struct { *mock.Call } // IsDirectory is a helper method to define mock.On call // - ctx context.Context // - path string func (_e *MockFileSystem_Expecter) IsDirectory(ctx any, path any) *MockFileSystem_IsDirectory_Call { return &MockFileSystem_IsDirectory_Call{Call: _e.mock.On("IsDirectory", ctx, path)} } func (_c *MockFileSystem_IsDirectory_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_IsDirectory_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockFileSystem_IsDirectory_Call) Return(b bool, err error) *MockFileSystem_IsDirectory_Call { _c.Call.Return(b, err) return _c } func (_c *MockFileSystem_IsDirectory_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_IsDirectory_Call { _c.Call.Return(run) return _c } // RemoveAll provides a mock function for the type MockFileSystem func (_mock *MockFileSystem) RemoveAll(ctx context.Context, path string) error { ret := _mock.Called(ctx, path) if len(ret) == 0 { panic("no return value specified for RemoveAll") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok { r0 = returnFunc(ctx, path) } else { r0 = ret.Error(0) } return r0 } // MockFileSystem_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll' type MockFileSystem_RemoveAll_Call struct { *mock.Call } // RemoveAll is a helper method to define mock.On call // - ctx context.Context // - path string func (_e *MockFileSystem_Expecter) RemoveAll(ctx any, path any) *MockFileSystem_RemoveAll_Call { return &MockFileSystem_RemoveAll_Call{Call: _e.mock.On("RemoveAll", ctx, path)} } func (_c *MockFileSystem_RemoveAll_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_RemoveAll_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockFileSystem_RemoveAll_Call) Return(err error) *MockFileSystem_RemoveAll_Call { _c.Call.Return(err) return _c } func (_c *MockFileSystem_RemoveAll_Call) RunAndReturn(run func(ctx context.Context, path string) error) *MockFileSystem_RemoveAll_Call { _c.Call.Return(run) return _c }