consul/internal/controller/cache/index/indexmock/mock_resourceIterable.go

98 lines
2.4 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"
)
// 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 with given fields:
func (_m *ResourceIterable) Next() ([]byte, []*pbresource.Resource, bool) {
ret := _m.Called()
var r0 []byte
var r1 []*pbresource.Resource
var r2 bool
if rf, ok := ret.Get(0).(func() ([]byte, []*pbresource.Resource, bool)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() []byte); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
if rf, ok := ret.Get(1).(func() []*pbresource.Resource); ok {
r1 = rf()
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).([]*pbresource.Resource)
}
}
if rf, ok := ret.Get(2).(func() bool); ok {
r2 = rf()
} 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(_a0 []byte, _a1 []*pbresource.Resource, _a2 bool) *ResourceIterable_Next_Call {
_c.Call.Return(_a0, _a1, _a2)
return _c
}
func (_c *ResourceIterable_Next_Call) RunAndReturn(run func() ([]byte, []*pbresource.Resource, bool)) *ResourceIterable_Next_Call {
_c.Call.Return(run)
return _c
}
// 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
}