From b130fba15ac89a9dbfd91fdcb9e4c62d79c608fd Mon Sep 17 00:00:00 2001 From: Josh Medeski Date: Thu, 26 Sep 2024 19:57:46 -0500 Subject: [PATCH] chore: update mockery --- dir/mock_Dir.go | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/dir/mock_Dir.go b/dir/mock_Dir.go index 3c3225f..727aeca 100644 --- a/dir/mock_Dir.go +++ b/dir/mock_Dir.go @@ -73,6 +73,62 @@ func (_c *MockDir_Dir_Call) RunAndReturn(run func(string) (bool, string)) *MockD return _c } +// RootDir provides a mock function with given fields: name +func (_m *MockDir) RootDir(name string) (bool, string) { + ret := _m.Called(name) + + if len(ret) == 0 { + panic("no return value specified for RootDir") + } + + var r0 bool + var r1 string + if rf, ok := ret.Get(0).(func(string) (bool, string)); ok { + return rf(name) + } + if rf, ok := ret.Get(0).(func(string) bool); ok { + r0 = rf(name) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(string) string); ok { + r1 = rf(name) + } else { + r1 = ret.Get(1).(string) + } + + return r0, r1 +} + +// MockDir_RootDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RootDir' +type MockDir_RootDir_Call struct { + *mock.Call +} + +// RootDir is a helper method to define mock.On call +// - name string +func (_e *MockDir_Expecter) RootDir(name interface{}) *MockDir_RootDir_Call { + return &MockDir_RootDir_Call{Call: _e.mock.On("RootDir", name)} +} + +func (_c *MockDir_RootDir_Call) Run(run func(name string)) *MockDir_RootDir_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockDir_RootDir_Call) Return(hasRootDir bool, absPath string) *MockDir_RootDir_Call { + _c.Call.Return(hasRootDir, absPath) + return _c +} + +func (_c *MockDir_RootDir_Call) RunAndReturn(run func(string) (bool, string)) *MockDir_RootDir_Call { + _c.Call.Return(run) + return _c +} + // NewMockDir creates a new instance of MockDir. 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 NewMockDir(t interface {