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