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

package mocks

import (
	"context"

	"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
	"github.com/argoproj/argo-cd/v3/util/notification/expression/shared"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Service_Expecter struct {
	mock *mock.Mock
}

func (_m *Service) EXPECT() *Service_Expecter {
	return &Service_Expecter{mock: &_m.Mock}
}

// GetAppDetails provides a mock function for the type Service
func (_mock *Service) GetAppDetails(ctx context.Context, app *v1alpha1.Application) (*shared.AppDetail, error) {
	ret := _mock.Called(ctx, app)

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

	var r0 *shared.AppDetail
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) (*shared.AppDetail, error)); ok {
		return returnFunc(ctx, app)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v1alpha1.Application) *shared.AppDetail); ok {
		r0 = returnFunc(ctx, app)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*shared.AppDetail)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *v1alpha1.Application) error); ok {
		r1 = returnFunc(ctx, app)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetAppDetails is a helper method to define mock.On call
//   - ctx context.Context
//   - app *v1alpha1.Application
func (_e *Service_Expecter) GetAppDetails(ctx interface{}, app interface{}) *Service_GetAppDetails_Call {
	return &Service_GetAppDetails_Call{Call: _e.mock.On("GetAppDetails", ctx, app)}
}

func (_c *Service_GetAppDetails_Call) Run(run func(ctx context.Context, app *v1alpha1.Application)) *Service_GetAppDetails_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *v1alpha1.Application
		if args[1] != nil {
			arg1 = args[1].(*v1alpha1.Application)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Service_GetAppDetails_Call) Return(appDetail *shared.AppDetail, err error) *Service_GetAppDetails_Call {
	_c.Call.Return(appDetail, err)
	return _c
}

func (_c *Service_GetAppDetails_Call) RunAndReturn(run func(ctx context.Context, app *v1alpha1.Application) (*shared.AppDetail, error)) *Service_GetAppDetails_Call {
	_c.Call.Return(run)
	return _c
}

// GetCommitMetadata provides a mock function for the type Service
func (_mock *Service) GetCommitMetadata(ctx context.Context, repoURL string, commitSHA string, project string) (*shared.CommitMetadata, error) {
	ret := _mock.Called(ctx, repoURL, commitSHA, project)

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

	var r0 *shared.CommitMetadata
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (*shared.CommitMetadata, error)); ok {
		return returnFunc(ctx, repoURL, commitSHA, project)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) *shared.CommitMetadata); ok {
		r0 = returnFunc(ctx, repoURL, commitSHA, project)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*shared.CommitMetadata)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
		r1 = returnFunc(ctx, repoURL, commitSHA, project)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetCommitMetadata is a helper method to define mock.On call
//   - ctx context.Context
//   - repoURL string
//   - commitSHA string
//   - project string
func (_e *Service_Expecter) GetCommitMetadata(ctx interface{}, repoURL interface{}, commitSHA interface{}, project interface{}) *Service_GetCommitMetadata_Call {
	return &Service_GetCommitMetadata_Call{Call: _e.mock.On("GetCommitMetadata", ctx, repoURL, commitSHA, project)}
}

func (_c *Service_GetCommitMetadata_Call) Run(run func(ctx context.Context, repoURL string, commitSHA string, project string)) *Service_GetCommitMetadata_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Service_GetCommitMetadata_Call) Return(commitMetadata *shared.CommitMetadata, err error) *Service_GetCommitMetadata_Call {
	_c.Call.Return(commitMetadata, err)
	return _c
}

func (_c *Service_GetCommitMetadata_Call) RunAndReturn(run func(ctx context.Context, repoURL string, commitSHA string, project string) (*shared.CommitMetadata, error)) *Service_GetCommitMetadata_Call {
	_c.Call.Return(run)
	return _c
}
