1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// 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.
14// The first argument is typically a *testing.T value.
15func NewMockFileSystem(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *MockFileSystem {
19 mock := &MockFileSystem{}
20 mock.Mock.Test(t)
21
22 t.Cleanup(func() { mock.AssertExpectations(t) })
23
24 return mock
25}
26
27// MockFileSystem is an autogenerated mock type for the FileSystem type
28type MockFileSystem struct {
29 mock.Mock
30}
31
32type MockFileSystem_Expecter struct {
33 mock *mock.Mock
34}
35
36func (_m *MockFileSystem) EXPECT() *MockFileSystem_Expecter {
37 return &MockFileSystem_Expecter{mock: &_m.Mock}
38}
39
40// Exists provides a mock function for the type MockFileSystem
41func (_mock *MockFileSystem) Exists(ctx context.Context, path string) (bool, error) {
42 ret := _mock.Called(ctx, path)
43
44 if len(ret) == 0 {
45 panic("no return value specified for Exists")
46 }
47
48 var r0 bool
49 var r1 error
50 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
51 return returnFunc(ctx, path)
52 }
53 if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
54 r0 = returnFunc(ctx, path)
55 } else {
56 r0 = ret.Get(0).(bool)
57 }
58 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
59 r1 = returnFunc(ctx, path)
60 } else {
61 r1 = ret.Error(1)
62 }
63 return r0, r1
64}
65
66// MockFileSystem_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists'
67type MockFileSystem_Exists_Call struct {
68 *mock.Call
69}
70
71// Exists is a helper method to define mock.On call
72// - ctx context.Context
73// - path string
74func (_e *MockFileSystem_Expecter) Exists(ctx any, path any) *MockFileSystem_Exists_Call {
75 return &MockFileSystem_Exists_Call{Call: _e.mock.On("Exists", ctx, path)}
76}
77
78func (_c *MockFileSystem_Exists_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_Exists_Call {
79 _c.Call.Run(func(args mock.Arguments) {
80 var arg0 context.Context
81 if args[0] != nil {
82 arg0 = args[0].(context.Context)
83 }
84 var arg1 string
85 if args[1] != nil {
86 arg1 = args[1].(string)
87 }
88 run(
89 arg0,
90 arg1,
91 )
92 })
93 return _c
94}
95
96func (_c *MockFileSystem_Exists_Call) Return(b bool, err error) *MockFileSystem_Exists_Call {
97 _c.Call.Return(b, err)
98 return _c
99}
100
101func (_c *MockFileSystem_Exists_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_Exists_Call {
102 _c.Call.Return(run)
103 return _c
104}
105
106// GetSize provides a mock function for the type MockFileSystem
107func (_mock *MockFileSystem) GetSize(ctx context.Context, path string) (int64, error) {
108 ret := _mock.Called(ctx, path)
109
110 if len(ret) == 0 {
111 panic("no return value specified for GetSize")
112 }
113
114 var r0 int64
115 var r1 error
116 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok {
117 return returnFunc(ctx, path)
118 }
119 if returnFunc, ok := ret.Get(0).(func(context.Context, string) int64); ok {
120 r0 = returnFunc(ctx, path)
121 } else {
122 r0 = ret.Get(0).(int64)
123 }
124 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
125 r1 = returnFunc(ctx, path)
126 } else {
127 r1 = ret.Error(1)
128 }
129 return r0, r1
130}
131
132// MockFileSystem_GetSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSize'
133type MockFileSystem_GetSize_Call struct {
134 *mock.Call
135}
136
137// GetSize is a helper method to define mock.On call
138// - ctx context.Context
139// - path string
140func (_e *MockFileSystem_Expecter) GetSize(ctx any, path any) *MockFileSystem_GetSize_Call {
141 return &MockFileSystem_GetSize_Call{Call: _e.mock.On("GetSize", ctx, path)}
142}
143
144func (_c *MockFileSystem_GetSize_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_GetSize_Call {
145 _c.Call.Run(func(args mock.Arguments) {
146 var arg0 context.Context
147 if args[0] != nil {
148 arg0 = args[0].(context.Context)
149 }
150 var arg1 string
151 if args[1] != nil {
152 arg1 = args[1].(string)
153 }
154 run(
155 arg0,
156 arg1,
157 )
158 })
159 return _c
160}
161
162func (_c *MockFileSystem_GetSize_Call) Return(n int64, err error) *MockFileSystem_GetSize_Call {
163 _c.Call.Return(n, err)
164 return _c
165}
166
167func (_c *MockFileSystem_GetSize_Call) RunAndReturn(run func(ctx context.Context, path string) (int64, error)) *MockFileSystem_GetSize_Call {
168 _c.Call.Return(run)
169 return _c
170}
171
172// IsDirectory provides a mock function for the type MockFileSystem
173func (_mock *MockFileSystem) IsDirectory(ctx context.Context, path string) (bool, error) {
174 ret := _mock.Called(ctx, path)
175
176 if len(ret) == 0 {
177 panic("no return value specified for IsDirectory")
178 }
179
180 var r0 bool
181 var r1 error
182 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok {
183 return returnFunc(ctx, path)
184 }
185 if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok {
186 r0 = returnFunc(ctx, path)
187 } else {
188 r0 = ret.Get(0).(bool)
189 }
190 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
191 r1 = returnFunc(ctx, path)
192 } else {
193 r1 = ret.Error(1)
194 }
195 return r0, r1
196}
197
198// MockFileSystem_IsDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDirectory'
199type MockFileSystem_IsDirectory_Call struct {
200 *mock.Call
201}
202
203// IsDirectory is a helper method to define mock.On call
204// - ctx context.Context
205// - path string
206func (_e *MockFileSystem_Expecter) IsDirectory(ctx any, path any) *MockFileSystem_IsDirectory_Call {
207 return &MockFileSystem_IsDirectory_Call{Call: _e.mock.On("IsDirectory", ctx, path)}
208}
209
210func (_c *MockFileSystem_IsDirectory_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_IsDirectory_Call {
211 _c.Call.Run(func(args mock.Arguments) {
212 var arg0 context.Context
213 if args[0] != nil {
214 arg0 = args[0].(context.Context)
215 }
216 var arg1 string
217 if args[1] != nil {
218 arg1 = args[1].(string)
219 }
220 run(
221 arg0,
222 arg1,
223 )
224 })
225 return _c
226}
227
228func (_c *MockFileSystem_IsDirectory_Call) Return(b bool, err error) *MockFileSystem_IsDirectory_Call {
229 _c.Call.Return(b, err)
230 return _c
231}
232
233func (_c *MockFileSystem_IsDirectory_Call) RunAndReturn(run func(ctx context.Context, path string) (bool, error)) *MockFileSystem_IsDirectory_Call {
234 _c.Call.Return(run)
235 return _c
236}
237
238// RemoveAll provides a mock function for the type MockFileSystem
239func (_mock *MockFileSystem) RemoveAll(ctx context.Context, path string) error {
240 ret := _mock.Called(ctx, path)
241
242 if len(ret) == 0 {
243 panic("no return value specified for RemoveAll")
244 }
245
246 var r0 error
247 if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
248 r0 = returnFunc(ctx, path)
249 } else {
250 r0 = ret.Error(0)
251 }
252 return r0
253}
254
255// MockFileSystem_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll'
256type MockFileSystem_RemoveAll_Call struct {
257 *mock.Call
258}
259
260// RemoveAll is a helper method to define mock.On call
261// - ctx context.Context
262// - path string
263func (_e *MockFileSystem_Expecter) RemoveAll(ctx any, path any) *MockFileSystem_RemoveAll_Call {
264 return &MockFileSystem_RemoveAll_Call{Call: _e.mock.On("RemoveAll", ctx, path)}
265}
266
267func (_c *MockFileSystem_RemoveAll_Call) Run(run func(ctx context.Context, path string)) *MockFileSystem_RemoveAll_Call {
268 _c.Call.Run(func(args mock.Arguments) {
269 var arg0 context.Context
270 if args[0] != nil {
271 arg0 = args[0].(context.Context)
272 }
273 var arg1 string
274 if args[1] != nil {
275 arg1 = args[1].(string)
276 }
277 run(
278 arg0,
279 arg1,
280 )
281 })
282 return _c
283}
284
285func (_c *MockFileSystem_RemoveAll_Call) Return(err error) *MockFileSystem_RemoveAll_Call {
286 _c.Call.Return(err)
287 return _c
288}
289
290func (_c *MockFileSystem_RemoveAll_Call) RunAndReturn(run func(ctx context.Context, path string) error) *MockFileSystem_RemoveAll_Call {
291 _c.Call.Return(run)
292 return _c
293}