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

package secret_engines

import (
	mock "github.com/stretchr/testify/mock"
	vault "gitlab.com/gitlab-org/gitlab-runner/helpers/vault"
)

// MockFactory is an autogenerated mock type for the Factory type
type MockFactory struct {
	mock.Mock
}

type MockFactory_Expecter struct {
	mock *mock.Mock
}

func (_m *MockFactory) EXPECT() *MockFactory_Expecter {
	return &MockFactory_Expecter{mock: &_m.Mock}
}

// Execute provides a mock function with given fields: client, path
func (_m *MockFactory) Execute(client vault.Client, path string) vault.SecretEngine {
	ret := _m.Called(client, path)

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

	var r0 vault.SecretEngine
	if rf, ok := ret.Get(0).(func(vault.Client, string) vault.SecretEngine); ok {
		r0 = rf(client, path)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(vault.SecretEngine)
		}
	}

	return r0
}

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

// Execute is a helper method to define mock.On call
//   - client vault.Client
//   - path string
func (_e *MockFactory_Expecter) Execute(client interface{}, path interface{}) *MockFactory_Execute_Call {
	return &MockFactory_Execute_Call{Call: _e.mock.On("Execute", client, path)}
}

func (_c *MockFactory_Execute_Call) Run(run func(client vault.Client, path string)) *MockFactory_Execute_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(vault.Client), args[1].(string))
	})
	return _c
}

func (_c *MockFactory_Execute_Call) Return(_a0 vault.SecretEngine) *MockFactory_Execute_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockFactory_Execute_Call) RunAndReturn(run func(vault.Client, string) vault.SecretEngine) *MockFactory_Execute_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
