mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 19:59:37 -06:00
Maintaining the positioning of the files from v2 to reduce cognitive
load.
Indentation of yaml files now matches `.editorconfig`.
All mock files regenerated.
Added empty `{}` following convention from `mockery init` etc.
Removed directory specification where it would already match.
109 lines
2.7 KiB
Go
109 lines
2.7 KiB
Go
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"github.com/opencloud-eu/reva/v2/pkg/rgrpc/todo/pool"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewSelectable creates a new instance of Selectable. 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 NewSelectable[T any](t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Selectable[T] {
|
|
mock := &Selectable[T]{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// Selectable is an autogenerated mock type for the Selectable type
|
|
type Selectable[T any] struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type Selectable_Expecter[T any] struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *Selectable[T]) EXPECT() *Selectable_Expecter[T] {
|
|
return &Selectable_Expecter[T]{mock: &_m.Mock}
|
|
}
|
|
|
|
// Next provides a mock function for the type Selectable
|
|
func (_mock *Selectable[T]) Next(opts ...pool.Option) (T, error) {
|
|
var tmpRet mock.Arguments
|
|
if len(opts) > 0 {
|
|
tmpRet = _mock.Called(opts)
|
|
} else {
|
|
tmpRet = _mock.Called()
|
|
}
|
|
ret := tmpRet
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Next")
|
|
}
|
|
|
|
var r0 T
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(...pool.Option) (T, error)); ok {
|
|
return returnFunc(opts...)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(...pool.Option) T); ok {
|
|
r0 = returnFunc(opts...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(T)
|
|
}
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(...pool.Option) error); ok {
|
|
r1 = returnFunc(opts...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// Selectable_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next'
|
|
type Selectable_Next_Call[T any] struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Next is a helper method to define mock.On call
|
|
// - opts ...pool.Option
|
|
func (_e *Selectable_Expecter[T]) Next(opts ...interface{}) *Selectable_Next_Call[T] {
|
|
return &Selectable_Next_Call[T]{Call: _e.mock.On("Next",
|
|
append([]interface{}{}, opts...)...)}
|
|
}
|
|
|
|
func (_c *Selectable_Next_Call[T]) Run(run func(opts ...pool.Option)) *Selectable_Next_Call[T] {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
var arg0 []pool.Option
|
|
var variadicArgs []pool.Option
|
|
if len(args) > 0 {
|
|
variadicArgs = args[0].([]pool.Option)
|
|
}
|
|
arg0 = variadicArgs
|
|
run(
|
|
arg0...,
|
|
)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *Selectable_Next_Call[T]) Return(v T, err error) *Selectable_Next_Call[T] {
|
|
_c.Call.Return(v, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *Selectable_Next_Call[T]) RunAndReturn(run func(opts ...pool.Option) (T, error)) *Selectable_Next_Call[T] {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|