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

package auth_methods

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: path, data
func (_m *MockFactory) Execute(path string, data Data) (vault.AuthMethod, error) {
	ret := _m.Called(path, data)

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

	var r0 vault.AuthMethod
	var r1 error
	if rf, ok := ret.Get(0).(func(string, Data) (vault.AuthMethod, error)); ok {
		return rf(path, data)
	}
	if rf, ok := ret.Get(0).(func(string, Data) vault.AuthMethod); ok {
		r0 = rf(path, data)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(vault.AuthMethod)
		}
	}

	if rf, ok := ret.Get(1).(func(string, Data) error); ok {
		r1 = rf(path, data)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// 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
//   - path string
//   - data Data
func (_e *MockFactory_Expecter) Execute(path interface{}, data interface{}) *MockFactory_Execute_Call {
	return &MockFactory_Execute_Call{Call: _e.mock.On("Execute", path, data)}
}

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

func (_c *MockFactory_Execute_Call) Return(_a0 vault.AuthMethod, _a1 error) *MockFactory_Execute_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockFactory_Execute_Call) RunAndReturn(run func(string, Data) (vault.AuthMethod, error)) *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
}
