// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package statefile import ( mock "github.com/stretchr/testify/mock" ) // newMockprocTree creates a new instance of mockprocTree. 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 newMockprocTree(t interface { mock.TestingT Cleanup(func()) }) *mockprocTree { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &mockprocTree{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // mockprocTree is an autogenerated mock type for the procTree type type mockprocTree struct { mock.Mock } type mockprocTree_Expecter struct { mock *mock.Mock } func (_m *mockprocTree) EXPECT() *mockprocTree_Expecter { return &mockprocTree_Expecter{mock: &_m.Mock} } // Parent provides a mock function for the type mockprocTree func (_mock *mockprocTree) Parent(pid int) (int, bool) { ret := _mock.Called(pid) if len(ret) == 0 { panic("no return value specified for Parent") } var r0 int var r1 bool if returnFunc, ok := ret.Get(0).(func(int) (int, bool)); ok { return returnFunc(pid) } if returnFunc, ok := ret.Get(0).(func(int) int); ok { r0 = returnFunc(pid) } else { r0 = ret.Get(0).(int) } if returnFunc, ok := ret.Get(1).(func(int) bool); ok { r1 = returnFunc(pid) } else { r1 = ret.Get(1).(bool) } return r0, r1 } // mockprocTree_Parent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Parent' type mockprocTree_Parent_Call struct { *mock.Call } // Parent is a helper method to define mock.On call // - pid int func (_e *mockprocTree_Expecter) Parent(pid any) *mockprocTree_Parent_Call { return &mockprocTree_Parent_Call{Call: _e.mock.On("Parent", pid)} } func (_c *mockprocTree_Parent_Call) Run(run func(pid int)) *mockprocTree_Parent_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 int if args[0] != nil { arg0 = args[0].(int) } run( arg0, ) }) return _c } func (_c *mockprocTree_Parent_Call) Return(n int, b bool) *mockprocTree_Parent_Call { _c.Call.Return(n, b) return _c } func (_c *mockprocTree_Parent_Call) RunAndReturn(run func(pid int) (int, bool)) *mockprocTree_Parent_Call { _c.Call.Return(run) return _c }