// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

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

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

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

	return mock
}

// MockreaderCloser is an autogenerated mock type for the readerCloser type
type MockreaderCloser struct {
	mock.Mock
}

type MockreaderCloser_Expecter struct {
	mock *mock.Mock
}

func (_m *MockreaderCloser) EXPECT() *MockreaderCloser_Expecter {
	return &MockreaderCloser_Expecter{mock: &_m.Mock}
}

// Close provides a mock function for the type MockreaderCloser
func (_mock *MockreaderCloser) Close() error {
	ret := _mock.Called()

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func() error); ok {
		r0 = returnFunc()
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Close is a helper method to define mock.On call
func (_e *MockreaderCloser_Expecter) Close() *MockreaderCloser_Close_Call {
	return &MockreaderCloser_Close_Call{Call: _e.mock.On("Close")}
}

func (_c *MockreaderCloser_Close_Call) Run(run func()) *MockreaderCloser_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockreaderCloser_Close_Call) Return(err error) *MockreaderCloser_Close_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockreaderCloser_Close_Call) RunAndReturn(run func() error) *MockreaderCloser_Close_Call {
	_c.Call.Return(run)
	return _c
}

// Read provides a mock function for the type MockreaderCloser
func (_mock *MockreaderCloser) Read(p []byte) (int, error) {
	ret := _mock.Called(p)

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

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

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

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

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

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

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