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

package indexmock

import (
	"github.com/hashicorp/consul/proto-public/pbresource"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type ResourceIterator_Expecter struct {
	mock *mock.Mock
}

func (_m *ResourceIterator) EXPECT() *ResourceIterator_Expecter {
	return &ResourceIterator_Expecter{mock: &_m.Mock}
}

// Next provides a mock function for the type ResourceIterator
func (_mock *ResourceIterator) Next() *pbresource.Resource {
	ret := _mock.Called()

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

	var r0 *pbresource.Resource
	if returnFunc, ok := ret.Get(0).(func() *pbresource.Resource); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*pbresource.Resource)
		}
	}
	return r0
}

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

// Next is a helper method to define mock.On call
func (_e *ResourceIterator_Expecter) Next() *ResourceIterator_Next_Call {
	return &ResourceIterator_Next_Call{Call: _e.mock.On("Next")}
}

func (_c *ResourceIterator_Next_Call) Run(run func()) *ResourceIterator_Next_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *ResourceIterator_Next_Call) Return(resource *pbresource.Resource) *ResourceIterator_Next_Call {
	_c.Call.Return(resource)
	return _c
}

func (_c *ResourceIterator_Next_Call) RunAndReturn(run func() *pbresource.Resource) *ResourceIterator_Next_Call {
	_c.Call.Return(run)
	return _c
}
