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

package mocks

import (
	"github.com/argoproj/argo-cd/v3/commitserver/apiclient"
	"github.com/argoproj/argo-cd/v3/util/io"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Clientset_Expecter struct {
	mock *mock.Mock
}

func (_m *Clientset) EXPECT() *Clientset_Expecter {
	return &Clientset_Expecter{mock: &_m.Mock}
}

// NewCommitServerClient provides a mock function for the type Clientset
func (_mock *Clientset) NewCommitServerClient() (io.Closer, apiclient.CommitServiceClient, error) {
	ret := _mock.Called()

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

	var r0 io.Closer
	var r1 apiclient.CommitServiceClient
	var r2 error
	if returnFunc, ok := ret.Get(0).(func() (io.Closer, apiclient.CommitServiceClient, error)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() io.Closer); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(io.Closer)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() apiclient.CommitServiceClient); ok {
		r1 = returnFunc()
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(apiclient.CommitServiceClient)
		}
	}
	if returnFunc, ok := ret.Get(2).(func() error); ok {
		r2 = returnFunc()
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}

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

// NewCommitServerClient is a helper method to define mock.On call
func (_e *Clientset_Expecter) NewCommitServerClient() *Clientset_NewCommitServerClient_Call {
	return &Clientset_NewCommitServerClient_Call{Call: _e.mock.On("NewCommitServerClient")}
}

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

func (_c *Clientset_NewCommitServerClient_Call) Return(closer io.Closer, commitServiceClient apiclient.CommitServiceClient, err error) *Clientset_NewCommitServerClient_Call {
	_c.Call.Return(closer, commitServiceClient, err)
	return _c
}

func (_c *Clientset_NewCommitServerClient_Call) RunAndReturn(run func() (io.Closer, apiclient.CommitServiceClient, error)) *Clientset_NewCommitServerClient_Call {
	_c.Call.Return(run)
	return _c
}
