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

package sync

import (
	context "context"

	repository "github.com/grafana/grafana/apps/provisioning/pkg/repository"
	mock "github.com/stretchr/testify/mock"

	resources "github.com/grafana/grafana/pkg/registry/apis/provisioning/resources"
)

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

type MockCompareFn_Expecter struct {
	mock *mock.Mock
}

func (_m *MockCompareFn) EXPECT() *MockCompareFn_Expecter {
	return &MockCompareFn_Expecter{mock: &_m.Mock}
}

// Execute provides a mock function with given fields: ctx, repo, repositoryResources, ref
func (_m *MockCompareFn) Execute(ctx context.Context, repo repository.Reader, repositoryResources resources.RepositoryResources, ref string) ([]ResourceFileChange, error) {
	ret := _m.Called(ctx, repo, repositoryResources, ref)

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

	var r0 []ResourceFileChange
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, repository.Reader, resources.RepositoryResources, string) ([]ResourceFileChange, error)); ok {
		return rf(ctx, repo, repositoryResources, ref)
	}
	if rf, ok := ret.Get(0).(func(context.Context, repository.Reader, resources.RepositoryResources, string) []ResourceFileChange); ok {
		r0 = rf(ctx, repo, repositoryResources, ref)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]ResourceFileChange)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, repository.Reader, resources.RepositoryResources, string) error); ok {
		r1 = rf(ctx, repo, repositoryResources, ref)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Execute is a helper method to define mock.On call
//   - ctx context.Context
//   - repo repository.Reader
//   - repositoryResources resources.RepositoryResources
//   - ref string
func (_e *MockCompareFn_Expecter) Execute(ctx interface{}, repo interface{}, repositoryResources interface{}, ref interface{}) *MockCompareFn_Execute_Call {
	return &MockCompareFn_Execute_Call{Call: _e.mock.On("Execute", ctx, repo, repositoryResources, ref)}
}

func (_c *MockCompareFn_Execute_Call) Run(run func(ctx context.Context, repo repository.Reader, repositoryResources resources.RepositoryResources, ref string)) *MockCompareFn_Execute_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(repository.Reader), args[2].(resources.RepositoryResources), args[3].(string))
	})
	return _c
}

func (_c *MockCompareFn_Execute_Call) Return(_a0 []ResourceFileChange, _a1 error) *MockCompareFn_Execute_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockCompareFn_Execute_Call) RunAndReturn(run func(context.Context, repository.Reader, resources.RepositoryResources, string) ([]ResourceFileChange, error)) *MockCompareFn_Execute_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
