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

package mocks

import (
	"context"

	"github.com/actions/actions-runner-controller/github/actions"
	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}
}

// HandleDesiredRunnerCount provides a mock function for the type MockWorker
func (_mock *MockWorker) HandleDesiredRunnerCount(ctx context.Context, count int, jobsCompleted int) (int, error) {
	ret := _mock.Called(ctx, count, jobsCompleted)

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

	var r0 int
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) (int, error)); ok {
		return returnFunc(ctx, count, jobsCompleted)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, int, int) int); ok {
		r0 = returnFunc(ctx, count, jobsCompleted)
	} else {
		r0 = ret.Get(0).(int)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, int, int) error); ok {
		r1 = returnFunc(ctx, count, jobsCompleted)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// HandleDesiredRunnerCount is a helper method to define mock.On call
//   - ctx context.Context
//   - count int
//   - jobsCompleted int
func (_e *MockWorker_Expecter) HandleDesiredRunnerCount(ctx interface{}, count interface{}, jobsCompleted interface{}) *MockWorker_HandleDesiredRunnerCount_Call {
	return &MockWorker_HandleDesiredRunnerCount_Call{Call: _e.mock.On("HandleDesiredRunnerCount", ctx, count, jobsCompleted)}
}

func (_c *MockWorker_HandleDesiredRunnerCount_Call) Run(run func(ctx context.Context, count int, jobsCompleted int)) *MockWorker_HandleDesiredRunnerCount_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 int
		if args[1] != nil {
			arg1 = args[1].(int)
		}
		var arg2 int
		if args[2] != nil {
			arg2 = args[2].(int)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockWorker_HandleDesiredRunnerCount_Call) Return(n int, err error) *MockWorker_HandleDesiredRunnerCount_Call {
	_c.Call.Return(n, err)
	return _c
}

func (_c *MockWorker_HandleDesiredRunnerCount_Call) RunAndReturn(run func(ctx context.Context, count int, jobsCompleted int) (int, error)) *MockWorker_HandleDesiredRunnerCount_Call {
	_c.Call.Return(run)
	return _c
}

// HandleJobStarted provides a mock function for the type MockWorker
func (_mock *MockWorker) HandleJobStarted(ctx context.Context, jobInfo *actions.JobStarted) error {
	ret := _mock.Called(ctx, jobInfo)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *actions.JobStarted) error); ok {
		r0 = returnFunc(ctx, jobInfo)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// HandleJobStarted is a helper method to define mock.On call
//   - ctx context.Context
//   - jobInfo *actions.JobStarted
func (_e *MockWorker_Expecter) HandleJobStarted(ctx interface{}, jobInfo interface{}) *MockWorker_HandleJobStarted_Call {
	return &MockWorker_HandleJobStarted_Call{Call: _e.mock.On("HandleJobStarted", ctx, jobInfo)}
}

func (_c *MockWorker_HandleJobStarted_Call) Run(run func(ctx context.Context, jobInfo *actions.JobStarted)) *MockWorker_HandleJobStarted_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *actions.JobStarted
		if args[1] != nil {
			arg1 = args[1].(*actions.JobStarted)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *MockWorker_HandleJobStarted_Call) RunAndReturn(run func(ctx context.Context, jobInfo *actions.JobStarted) error) *MockWorker_HandleJobStarted_Call {
	_c.Call.Return(run)
	return _c
}
