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

package archive

import (
	io "io"

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

// MockNewArchiverFunc is an autogenerated mock type for the NewArchiverFunc type
type MockNewArchiverFunc struct {
	mock.Mock
}

type MockNewArchiverFunc_Expecter struct {
	mock *mock.Mock
}

func (_m *MockNewArchiverFunc) EXPECT() *MockNewArchiverFunc_Expecter {
	return &MockNewArchiverFunc_Expecter{mock: &_m.Mock}
}

// Execute provides a mock function with given fields: w, dir, level
func (_m *MockNewArchiverFunc) Execute(w io.Writer, dir string, level CompressionLevel) (Archiver, error) {
	ret := _m.Called(w, dir, level)

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

	var r0 Archiver
	var r1 error
	if rf, ok := ret.Get(0).(func(io.Writer, string, CompressionLevel) (Archiver, error)); ok {
		return rf(w, dir, level)
	}
	if rf, ok := ret.Get(0).(func(io.Writer, string, CompressionLevel) Archiver); ok {
		r0 = rf(w, dir, level)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(Archiver)
		}
	}

	if rf, ok := ret.Get(1).(func(io.Writer, string, CompressionLevel) error); ok {
		r1 = rf(w, dir, level)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Execute is a helper method to define mock.On call
//   - w io.Writer
//   - dir string
//   - level CompressionLevel
func (_e *MockNewArchiverFunc_Expecter) Execute(w interface{}, dir interface{}, level interface{}) *MockNewArchiverFunc_Execute_Call {
	return &MockNewArchiverFunc_Execute_Call{Call: _e.mock.On("Execute", w, dir, level)}
}

func (_c *MockNewArchiverFunc_Execute_Call) Run(run func(w io.Writer, dir string, level CompressionLevel)) *MockNewArchiverFunc_Execute_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(io.Writer), args[1].(string), args[2].(CompressionLevel))
	})
	return _c
}

func (_c *MockNewArchiverFunc_Execute_Call) Return(_a0 Archiver, _a1 error) *MockNewArchiverFunc_Execute_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockNewArchiverFunc_Execute_Call) RunAndReturn(run func(io.Writer, string, CompressionLevel) (Archiver, error)) *MockNewArchiverFunc_Execute_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
