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

package controllermock

import (
	"context"

	"github.com/hashicorp/consul/internal/controller"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Reconciler_Expecter struct {
	mock *mock.Mock
}

func (_m *Reconciler) EXPECT() *Reconciler_Expecter {
	return &Reconciler_Expecter{mock: &_m.Mock}
}

// Reconcile provides a mock function for the type Reconciler
func (_mock *Reconciler) Reconcile(ctx context.Context, rt controller.Runtime, req controller.Request) error {
	ret := _mock.Called(ctx, rt, req)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, controller.Runtime, controller.Request) error); ok {
		r0 = returnFunc(ctx, rt, req)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Reconcile is a helper method to define mock.On call
//   - ctx context.Context
//   - rt controller.Runtime
//   - req controller.Request
func (_e *Reconciler_Expecter) Reconcile(ctx interface{}, rt interface{}, req interface{}) *Reconciler_Reconcile_Call {
	return &Reconciler_Reconcile_Call{Call: _e.mock.On("Reconcile", ctx, rt, req)}
}

func (_c *Reconciler_Reconcile_Call) Run(run func(ctx context.Context, rt controller.Runtime, req controller.Request)) *Reconciler_Reconcile_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 controller.Runtime
		if args[1] != nil {
			arg1 = args[1].(controller.Runtime)
		}
		var arg2 controller.Request
		if args[2] != nil {
			arg2 = args[2].(controller.Request)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

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

func (_c *Reconciler_Reconcile_Call) RunAndReturn(run func(ctx context.Context, rt controller.Runtime, req controller.Request) error) *Reconciler_Reconcile_Call {
	_c.Call.Return(run)
	return _c
}
