// 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"
)

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

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

	return mock
}

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

type Initializer_Expecter struct {
	mock *mock.Mock
}

func (_m *Initializer) EXPECT() *Initializer_Expecter {
	return &Initializer_Expecter{mock: &_m.Mock}
}

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

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

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

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

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

func (_c *Initializer_Initialize_Call) Run(run func(ctx context.Context, rt controller.Runtime)) *Initializer_Initialize_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)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

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