mirror of https://github.com/hashicorp/consul
79 lines
2.0 KiB
Go
79 lines
2.0 KiB
Go
|
// Code generated by mockery v2.37.1. DO NOT EDIT.
|
||
|
|
||
|
package indexmock
|
||
|
|
||
|
import (
|
||
|
pbresource "github.com/hashicorp/consul/proto-public/pbresource"
|
||
|
mock "github.com/stretchr/testify/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 with given fields:
|
||
|
func (_m *ResourceIterator) Next() *pbresource.Resource {
|
||
|
ret := _m.Called()
|
||
|
|
||
|
var r0 *pbresource.Resource
|
||
|
if rf, ok := ret.Get(0).(func() *pbresource.Resource); ok {
|
||
|
r0 = rf()
|
||
|
} 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(_a0 *pbresource.Resource) *ResourceIterator_Next_Call {
|
||
|
_c.Call.Return(_a0)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
func (_c *ResourceIterator_Next_Call) RunAndReturn(run func() *pbresource.Resource) *ResourceIterator_Next_Call {
|
||
|
_c.Call.Return(run)
|
||
|
return _c
|
||
|
}
|
||
|
|
||
|
// 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
|
||
|
}
|