// Code generated by mockery v2.53.3. DO NOT EDIT.

package exec

import mock "github.com/stretchr/testify/mock"

// mockReader is an autogenerated mock type for the reader type
type mockReader struct {
	mock.Mock
}

type mockReader_Expecter struct {
	mock *mock.Mock
}

func (_m *mockReader) EXPECT() *mockReader_Expecter {
	return &mockReader_Expecter{mock: &_m.Mock}
}

// Read provides a mock function with given fields: p
func (_m *mockReader) Read(p []byte) (int, error) {
	ret := _m.Called(p)

	if len(ret) == 0 {
		panic("no return value specified for Read")
	}

	var r0 int
	var r1 error
	if rf, ok := ret.Get(0).(func([]byte) (int, error)); ok {
		return rf(p)
	}
	if rf, ok := ret.Get(0).(func([]byte) int); ok {
		r0 = rf(p)
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func([]byte) error); ok {
		r1 = rf(p)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// mockReader_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'
type mockReader_Read_Call struct {
	*mock.Call
}

// Read is a helper method to define mock.On call
//   - p []byte
func (_e *mockReader_Expecter) Read(p interface{}) *mockReader_Read_Call {
	return &mockReader_Read_Call{Call: _e.mock.On("Read", p)}
}

func (_c *mockReader_Read_Call) Run(run func(p []byte)) *mockReader_Read_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].([]byte))
	})
	return _c
}

func (_c *mockReader_Read_Call) Return(n int, err error) *mockReader_Read_Call {
	_c.Call.Return(n, err)
	return _c
}

func (_c *mockReader_Read_Call) RunAndReturn(run func([]byte) (int, error)) *mockReader_Read_Call {
	_c.Call.Return(run)
	return _c
}

// newMockReader creates a new instance of mockReader. 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 newMockReader(t interface {
	mock.TestingT
	Cleanup(func())
}) *mockReader {
	mock := &mockReader{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
