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

package jobs

import (
	context "context"

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

	v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
)

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

type MockWorker_Expecter struct {
	mock *mock.Mock
}

func (_m *MockWorker) EXPECT() *MockWorker_Expecter {
	return &MockWorker_Expecter{mock: &_m.Mock}
}

// IsSupported provides a mock function with given fields: ctx, job
func (_m *MockWorker) IsSupported(ctx context.Context, job v0alpha1.Job) bool {
	ret := _m.Called(ctx, job)

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

	var r0 bool
	if rf, ok := ret.Get(0).(func(context.Context, v0alpha1.Job) bool); ok {
		r0 = rf(ctx, job)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

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

// IsSupported is a helper method to define mock.On call
//   - ctx context.Context
//   - job v0alpha1.Job
func (_e *MockWorker_Expecter) IsSupported(ctx interface{}, job interface{}) *MockWorker_IsSupported_Call {
	return &MockWorker_IsSupported_Call{Call: _e.mock.On("IsSupported", ctx, job)}
}

func (_c *MockWorker_IsSupported_Call) Run(run func(ctx context.Context, job v0alpha1.Job)) *MockWorker_IsSupported_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(v0alpha1.Job))
	})
	return _c
}

func (_c *MockWorker_IsSupported_Call) Return(_a0 bool) *MockWorker_IsSupported_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWorker_IsSupported_Call) RunAndReturn(run func(context.Context, v0alpha1.Job) bool) *MockWorker_IsSupported_Call {
	_c.Call.Return(run)
	return _c
}

// Process provides a mock function with given fields: ctx, repo, job, progress
func (_m *MockWorker) Process(ctx context.Context, repo repository.Repository, job v0alpha1.Job, progress JobProgressRecorder) error {
	ret := _m.Called(ctx, repo, job, progress)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, repository.Repository, v0alpha1.Job, JobProgressRecorder) error); ok {
		r0 = rf(ctx, repo, job, progress)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Process is a helper method to define mock.On call
//   - ctx context.Context
//   - repo repository.Repository
//   - job v0alpha1.Job
//   - progress JobProgressRecorder
func (_e *MockWorker_Expecter) Process(ctx interface{}, repo interface{}, job interface{}, progress interface{}) *MockWorker_Process_Call {
	return &MockWorker_Process_Call{Call: _e.mock.On("Process", ctx, repo, job, progress)}
}

func (_c *MockWorker_Process_Call) Run(run func(ctx context.Context, repo repository.Repository, job v0alpha1.Job, progress JobProgressRecorder)) *MockWorker_Process_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(repository.Repository), args[2].(v0alpha1.Job), args[3].(JobProgressRecorder))
	})
	return _c
}

func (_c *MockWorker_Process_Call) Return(_a0 error) *MockWorker_Process_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockWorker_Process_Call) RunAndReturn(run func(context.Context, repository.Repository, v0alpha1.Job, JobProgressRecorder) error) *MockWorker_Process_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
