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

package mocks

import (
	"context"

	"code.forgejo.org/forgejo/actions-proto/runner/v1"

	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type MockRunner_Expecter struct {
	mock *mock.Mock
}

func (_m *MockRunner) EXPECT() *MockRunner_Expecter {
	return &MockRunner_Expecter{mock: &_m.Mock}
}

// Run provides a mock function for the type MockRunner
func (_mock *MockRunner) Run(ctx context.Context, task *runnerv1.Task) {
	_mock.Called(ctx, task)
	return
}

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

// Run is a helper method to define mock.On call
//   - ctx context.Context
//   - task *runnerv1.Task
func (_e *MockRunner_Expecter) Run(ctx interface{}, task interface{}) *MockRunner_Run_Call {
	return &MockRunner_Run_Call{Call: _e.mock.On("Run", ctx, task)}
}

func (_c *MockRunner_Run_Call) Run(run func(ctx context.Context, task *runnerv1.Task)) *MockRunner_Run_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *runnerv1.Task
		if args[1] != nil {
			arg1 = args[1].(*runnerv1.Task)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockRunner_Run_Call) Return() *MockRunner_Run_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockRunner_Run_Call) RunAndReturn(run func(ctx context.Context, task *runnerv1.Task)) *MockRunner_Run_Call {
	_c.Run(run)
	return _c
}
