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

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

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

	return mock
}

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

type ResourceIterable_Expecter struct {
	mock *mock.Mock
}

func (_m *ResourceIterable) EXPECT() *ResourceIterable_Expecter {
	return &ResourceIterable_Expecter{mock: &_m.Mock}
}

// Next provides a mock function for the type ResourceIterable
func (_mock *ResourceIterable) Next() ([]byte, []*pbresource.Resource, bool) {
	ret := _mock.Called()

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

	var r0 []byte
	var r1 []*pbresource.Resource
	var r2 bool
	if returnFunc, ok := ret.Get(0).(func() ([]byte, []*pbresource.Resource, bool)); ok {
		return returnFunc()
	}
	if returnFunc, ok := ret.Get(0).(func() []byte); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]byte)
		}
	}
	if returnFunc, ok := ret.Get(1).(func() []*pbresource.Resource); ok {
		r1 = returnFunc()
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).([]*pbresource.Resource)
		}
	}
	if returnFunc, ok := ret.Get(2).(func() bool); ok {
		r2 = returnFunc()
	} else {
		r2 = ret.Get(2).(bool)
	}
	return r0, r1, r2
}

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

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

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

func (_c *ResourceIterable_Next_Call) Return(bytes []byte, resources []*pbresource.Resource, b bool) *ResourceIterable_Next_Call {
	_c.Call.Return(bytes, resources, b)
	return _c
}

func (_c *ResourceIterable_Next_Call) RunAndReturn(run func() ([]byte, []*pbresource.Resource, bool)) *ResourceIterable_Next_Call {
	_c.Call.Return(run)
	return _c
}
