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

package worker

import (
	"context"

	"github.com/CMSgov/bcda-app/bcda/models"
	"github.com/CMSgov/bcda-app/bcdaworker/queueing/worker_types"
	mock "github.com/stretchr/testify/mock"
)

// 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
}

// 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}
}

// ProcessJob provides a mock function for the type MockWorker
func (_mock *MockWorker) ProcessJob(ctx context.Context, queJobID int64, job models.Job, jobArgs worker_types.JobEnqueueArgs) error {
	ret := _mock.Called(ctx, queJobID, job, jobArgs)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64, models.Job, worker_types.JobEnqueueArgs) error); ok {
		r0 = returnFunc(ctx, queJobID, job, jobArgs)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// ProcessJob is a helper method to define mock.On call
//   - ctx context.Context
//   - queJobID int64
//   - job models.Job
//   - jobArgs worker_types.JobEnqueueArgs
func (_e *MockWorker_Expecter) ProcessJob(ctx interface{}, queJobID interface{}, job interface{}, jobArgs interface{}) *MockWorker_ProcessJob_Call {
	return &MockWorker_ProcessJob_Call{Call: _e.mock.On("ProcessJob", ctx, queJobID, job, jobArgs)}
}

func (_c *MockWorker_ProcessJob_Call) Run(run func(ctx context.Context, queJobID int64, job models.Job, jobArgs worker_types.JobEnqueueArgs)) *MockWorker_ProcessJob_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 int64
		if args[1] != nil {
			arg1 = args[1].(int64)
		}
		var arg2 models.Job
		if args[2] != nil {
			arg2 = args[2].(models.Job)
		}
		var arg3 worker_types.JobEnqueueArgs
		if args[3] != nil {
			arg3 = args[3].(worker_types.JobEnqueueArgs)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *MockWorker_ProcessJob_Call) Return(err error) *MockWorker_ProcessJob_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockWorker_ProcessJob_Call) RunAndReturn(run func(ctx context.Context, queJobID int64, job models.Job, jobArgs worker_types.JobEnqueueArgs) error) *MockWorker_ProcessJob_Call {
	_c.Call.Return(run)
	return _c
}

// ValidateJob provides a mock function for the type MockWorker
func (_mock *MockWorker) ValidateJob(ctx context.Context, queJobID int64, jobArgs worker_types.JobEnqueueArgs) (*models.Job, error) {
	ret := _mock.Called(ctx, queJobID, jobArgs)

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

	var r0 *models.Job
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64, worker_types.JobEnqueueArgs) (*models.Job, error)); ok {
		return returnFunc(ctx, queJobID, jobArgs)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64, worker_types.JobEnqueueArgs) *models.Job); ok {
		r0 = returnFunc(ctx, queJobID, jobArgs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*models.Job)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, int64, worker_types.JobEnqueueArgs) error); ok {
		r1 = returnFunc(ctx, queJobID, jobArgs)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ValidateJob is a helper method to define mock.On call
//   - ctx context.Context
//   - queJobID int64
//   - jobArgs worker_types.JobEnqueueArgs
func (_e *MockWorker_Expecter) ValidateJob(ctx interface{}, queJobID interface{}, jobArgs interface{}) *MockWorker_ValidateJob_Call {
	return &MockWorker_ValidateJob_Call{Call: _e.mock.On("ValidateJob", ctx, queJobID, jobArgs)}
}

func (_c *MockWorker_ValidateJob_Call) Run(run func(ctx context.Context, queJobID int64, jobArgs worker_types.JobEnqueueArgs)) *MockWorker_ValidateJob_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 int64
		if args[1] != nil {
			arg1 = args[1].(int64)
		}
		var arg2 worker_types.JobEnqueueArgs
		if args[2] != nil {
			arg2 = args[2].(worker_types.JobEnqueueArgs)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockWorker_ValidateJob_Call) Return(job *models.Job, err error) *MockWorker_ValidateJob_Call {
	_c.Call.Return(job, err)
	return _c
}

func (_c *MockWorker_ValidateJob_Call) RunAndReturn(run func(ctx context.Context, queJobID int64, jobArgs worker_types.JobEnqueueArgs) (*models.Job, error)) *MockWorker_ValidateJob_Call {
	_c.Call.Return(run)
	return _c
}
