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

package jobs

import (
	context "context"

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

// MockHistoryWriter is an autogenerated mock type for the HistoryWriter type
type MockHistoryWriter struct {
	mock.Mock
}

type MockHistoryWriter_Expecter struct {
	mock *mock.Mock
}

func (_m *MockHistoryWriter) EXPECT() *MockHistoryWriter_Expecter {
	return &MockHistoryWriter_Expecter{mock: &_m.Mock}
}

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

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

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

	return r0
}

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

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

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

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

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

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

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

	return mock
}
