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

package mocks

import (
	git "github.com/argoproj/argo-cd/v3/util/git"
	mock "github.com/stretchr/testify/mock"

	v1alpha1 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
)

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

// NewClient provides a mock function with given fields: repo, rootPath
func (_m *RepoClientFactory) NewClient(repo *v1alpha1.Repository, rootPath string) (git.Client, error) {
	ret := _m.Called(repo, rootPath)

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

	var r0 git.Client
	var r1 error
	if rf, ok := ret.Get(0).(func(*v1alpha1.Repository, string) (git.Client, error)); ok {
		return rf(repo, rootPath)
	}
	if rf, ok := ret.Get(0).(func(*v1alpha1.Repository, string) git.Client); ok {
		r0 = rf(repo, rootPath)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(git.Client)
		}
	}

	if rf, ok := ret.Get(1).(func(*v1alpha1.Repository, string) error); ok {
		r1 = rf(repo, rootPath)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

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

	return mock
}
