executors/docker/internal/volumes/parser/mock_Path.go (165 lines of code) (raw):

// Code generated by mockery v2.53.3. DO NOT EDIT. package parser import mock "github.com/stretchr/testify/mock" // MockPath is an autogenerated mock type for the Path type type MockPath struct { mock.Mock } type MockPath_Expecter struct { mock *mock.Mock } func (_m *MockPath) EXPECT() *MockPath_Expecter { return &MockPath_Expecter{mock: &_m.Mock} } // Contains provides a mock function with given fields: basePath, targetPath func (_m *MockPath) Contains(basePath string, targetPath string) bool { ret := _m.Called(basePath, targetPath) if len(ret) == 0 { panic("no return value specified for Contains") } var r0 bool if rf, ok := ret.Get(0).(func(string, string) bool); ok { r0 = rf(basePath, targetPath) } else { r0 = ret.Get(0).(bool) } return r0 } // MockPath_Contains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Contains' type MockPath_Contains_Call struct { *mock.Call } // Contains is a helper method to define mock.On call // - basePath string // - targetPath string func (_e *MockPath_Expecter) Contains(basePath interface{}, targetPath interface{}) *MockPath_Contains_Call { return &MockPath_Contains_Call{Call: _e.mock.On("Contains", basePath, targetPath)} } func (_c *MockPath_Contains_Call) Run(run func(basePath string, targetPath string)) *MockPath_Contains_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string), args[1].(string)) }) return _c } func (_c *MockPath_Contains_Call) Return(_a0 bool) *MockPath_Contains_Call { _c.Call.Return(_a0) return _c } func (_c *MockPath_Contains_Call) RunAndReturn(run func(string, string) bool) *MockPath_Contains_Call { _c.Call.Return(run) return _c } // IsAbs provides a mock function with given fields: path func (_m *MockPath) IsAbs(path string) bool { ret := _m.Called(path) if len(ret) == 0 { panic("no return value specified for IsAbs") } var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(path) } else { r0 = ret.Get(0).(bool) } return r0 } // MockPath_IsAbs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAbs' type MockPath_IsAbs_Call struct { *mock.Call } // IsAbs is a helper method to define mock.On call // - path string func (_e *MockPath_Expecter) IsAbs(path interface{}) *MockPath_IsAbs_Call { return &MockPath_IsAbs_Call{Call: _e.mock.On("IsAbs", path)} } func (_c *MockPath_IsAbs_Call) Run(run func(path string)) *MockPath_IsAbs_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string)) }) return _c } func (_c *MockPath_IsAbs_Call) Return(_a0 bool) *MockPath_IsAbs_Call { _c.Call.Return(_a0) return _c } func (_c *MockPath_IsAbs_Call) RunAndReturn(run func(string) bool) *MockPath_IsAbs_Call { _c.Call.Return(run) return _c } // IsRoot provides a mock function with given fields: path func (_m *MockPath) IsRoot(path string) bool { ret := _m.Called(path) if len(ret) == 0 { panic("no return value specified for IsRoot") } var r0 bool if rf, ok := ret.Get(0).(func(string) bool); ok { r0 = rf(path) } else { r0 = ret.Get(0).(bool) } return r0 } // MockPath_IsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRoot' type MockPath_IsRoot_Call struct { *mock.Call } // IsRoot is a helper method to define mock.On call // - path string func (_e *MockPath_Expecter) IsRoot(path interface{}) *MockPath_IsRoot_Call { return &MockPath_IsRoot_Call{Call: _e.mock.On("IsRoot", path)} } func (_c *MockPath_IsRoot_Call) Run(run func(path string)) *MockPath_IsRoot_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(string)) }) return _c } func (_c *MockPath_IsRoot_Call) Return(_a0 bool) *MockPath_IsRoot_Call { _c.Call.Return(_a0) return _c } func (_c *MockPath_IsRoot_Call) RunAndReturn(run func(string) bool) *MockPath_IsRoot_Call { _c.Call.Return(run) return _c } // Join provides a mock function with given fields: elem func (_m *MockPath) Join(elem ...string) string { _va := make([]interface{}, len(elem)) for _i := range elem { _va[_i] = elem[_i] } var _ca []interface{} _ca = append(_ca, _va...) ret := _m.Called(_ca...) if len(ret) == 0 { panic("no return value specified for Join") } var r0 string if rf, ok := ret.Get(0).(func(...string) string); ok { r0 = rf(elem...) } else { r0 = ret.Get(0).(string) } return r0 } // MockPath_Join_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Join' type MockPath_Join_Call struct { *mock.Call } // Join is a helper method to define mock.On call // - elem ...string func (_e *MockPath_Expecter) Join(elem ...interface{}) *MockPath_Join_Call { return &MockPath_Join_Call{Call: _e.mock.On("Join", append([]interface{}{}, elem...)...)} } func (_c *MockPath_Join_Call) Run(run func(elem ...string)) *MockPath_Join_Call { _c.Call.Run(func(args mock.Arguments) { variadicArgs := make([]string, len(args)-0) for i, a := range args[0:] { if a != nil { variadicArgs[i] = a.(string) } } run(variadicArgs...) }) return _c } func (_c *MockPath_Join_Call) Return(_a0 string) *MockPath_Join_Call { _c.Call.Return(_a0) return _c } func (_c *MockPath_Join_Call) RunAndReturn(run func(...string) string) *MockPath_Join_Call { _c.Call.Return(run) return _c } // NewMockPath creates a new instance of MockPath. 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 NewMockPath(t interface { mock.TestingT Cleanup(func()) }) *MockPath { mock := &MockPath{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }