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

package mock

import (
	context "context"

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

	v1alpha1 "github.com/argoproj-labs/gitops-promoter/api/v1alpha1"
)

// MockCommitStatusProvider is an autogenerated mock type for the CommitStatusProvider type
type MockCommitStatusProvider struct {
	mock.Mock
}

type MockCommitStatusProvider_Expecter struct {
	mock *mock.Mock
}

func (_m *MockCommitStatusProvider) EXPECT() *MockCommitStatusProvider_Expecter {
	return &MockCommitStatusProvider_Expecter{mock: &_m.Mock}
}

// Set provides a mock function with given fields: ctx, commitStatus
func (_m *MockCommitStatusProvider) Set(ctx context.Context, commitStatus *v1alpha1.CommitStatus) (*v1alpha1.CommitStatus, error) {
	ret := _m.Called(ctx, commitStatus)

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

	var r0 *v1alpha1.CommitStatus
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.CommitStatus) (*v1alpha1.CommitStatus, error)); ok {
		return rf(ctx, commitStatus)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *v1alpha1.CommitStatus) *v1alpha1.CommitStatus); ok {
		r0 = rf(ctx, commitStatus)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v1alpha1.CommitStatus)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *v1alpha1.CommitStatus) error); ok {
		r1 = rf(ctx, commitStatus)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Set is a helper method to define mock.On call
//   - ctx context.Context
//   - commitStatus *v1alpha1.CommitStatus
func (_e *MockCommitStatusProvider_Expecter) Set(ctx interface{}, commitStatus interface{}) *MockCommitStatusProvider_Set_Call {
	return &MockCommitStatusProvider_Set_Call{Call: _e.mock.On("Set", ctx, commitStatus)}
}

func (_c *MockCommitStatusProvider_Set_Call) Run(run func(ctx context.Context, commitStatus *v1alpha1.CommitStatus)) *MockCommitStatusProvider_Set_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*v1alpha1.CommitStatus))
	})
	return _c
}

func (_c *MockCommitStatusProvider_Set_Call) Return(_a0 *v1alpha1.CommitStatus, _a1 error) *MockCommitStatusProvider_Set_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockCommitStatusProvider_Set_Call) RunAndReturn(run func(context.Context, *v1alpha1.CommitStatus) (*v1alpha1.CommitStatus, error)) *MockCommitStatusProvider_Set_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
