consul/internal/controller/cache/indexers/indexersmock/mock_FromArgs.go

96 lines
2.4 KiB
Go

// Code generated by mockery v2.37.1. DO NOT EDIT.
package indexersmock
import mock "github.com/stretchr/testify/mock"
// FromArgs is an autogenerated mock type for the FromArgs type
type FromArgs struct {
mock.Mock
}
type FromArgs_Expecter struct {
mock *mock.Mock
}
func (_m *FromArgs) EXPECT() *FromArgs_Expecter {
return &FromArgs_Expecter{mock: &_m.Mock}
}
// Execute provides a mock function with given fields: args
func (_m *FromArgs) Execute(args ...interface{}) ([]byte, error) {
var _ca []interface{}
_ca = append(_ca, args...)
ret := _m.Called(_ca...)
var r0 []byte
var r1 error
if rf, ok := ret.Get(0).(func(...interface{}) ([]byte, error)); ok {
return rf(args...)
}
if rf, ok := ret.Get(0).(func(...interface{}) []byte); ok {
r0 = rf(args...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
if rf, ok := ret.Get(1).(func(...interface{}) error); ok {
r1 = rf(args...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FromArgs_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
type FromArgs_Execute_Call struct {
*mock.Call
}
// Execute is a helper method to define mock.On call
// - args ...interface{}
func (_e *FromArgs_Expecter) Execute(args ...interface{}) *FromArgs_Execute_Call {
return &FromArgs_Execute_Call{Call: _e.mock.On("Execute",
append([]interface{}{}, args...)...)}
}
func (_c *FromArgs_Execute_Call) Run(run func(args ...interface{})) *FromArgs_Execute_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]interface{}, len(args)-0)
for i, a := range args[0:] {
if a != nil {
variadicArgs[i] = a.(interface{})
}
}
run(variadicArgs...)
})
return _c
}
func (_c *FromArgs_Execute_Call) Return(_a0 []byte, _a1 error) *FromArgs_Execute_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *FromArgs_Execute_Call) RunAndReturn(run func(...interface{}) ([]byte, error)) *FromArgs_Execute_Call {
_c.Call.Return(run)
return _c
}
// NewFromArgs creates a new instance of FromArgs. 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 NewFromArgs(t interface {
mock.TestingT
Cleanup(func())
}) *FromArgs {
mock := &FromArgs{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}