// Code generated by mockery v2.43.2. DO NOT EDIT.

package mocks

import (
	pool "github.com/owncloud/reva/v2/pkg/rgrpc/todo/pool"
	mock "github.com/stretchr/testify/mock"
)

// Selectable is an autogenerated mock type for the Selectable type
type Selectable[T interface{}] struct {
	mock.Mock
}

type Selectable_Expecter[T interface{}] struct {
	mock *mock.Mock
}

func (_m *Selectable[T]) EXPECT() *Selectable_Expecter[T] {
	return &Selectable_Expecter[T]{mock: &_m.Mock}
}

// Next provides a mock function with given fields: opts
func (_m *Selectable[T]) Next(opts ...pool.Option) (T, error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 T
	var r1 error
	if rf, ok := ret.Get(0).(func(...pool.Option) (T, error)); ok {
		return rf(opts...)
	}
	if rf, ok := ret.Get(0).(func(...pool.Option) T); ok {
		r0 = rf(opts...)
	} else {
		r0 = ret.Get(0).(T)
	}

	if rf, ok := ret.Get(1).(func(...pool.Option) error); ok {
		r1 = rf(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 interface{}] 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) {
		variadicArgs := make([]pool.Option, len(args)-0)
		for i, a := range args[0:] {
			if a != nil {
				variadicArgs[i] = a.(pool.Option)
			}
		}
		run(variadicArgs...)
	})
	return _c
}

func (_c *Selectable_Next_Call[T]) Return(_a0 T, _a1 error) *Selectable_Next_Call[T] {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Selectable_Next_Call[T]) RunAndReturn(run func(...pool.Option) (T, error)) *Selectable_Next_Call[T] {
	_c.Call.Return(run)
	return _c
}

// 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 interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *Selectable[T] {
	mock := &Selectable[T]{}
	mock.Mock.Test(t)

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

	return mock
}
