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

package retry

import mock "github.com/stretchr/testify/mock"

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

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

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

// Run provides a mock function with no fields
func (_m *mockValueRetryable[T]) Run() (T, error) {
	ret := _m.Called()

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

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

	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// mockValueRetryable_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
type mockValueRetryable_Run_Call[T interface{}] struct {
	*mock.Call
}

// Run is a helper method to define mock.On call
func (_e *mockValueRetryable_Expecter[T]) Run() *mockValueRetryable_Run_Call[T] {
	return &mockValueRetryable_Run_Call[T]{Call: _e.mock.On("Run")}
}

func (_c *mockValueRetryable_Run_Call[T]) Run(run func()) *mockValueRetryable_Run_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

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

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

// ShouldRetry provides a mock function with given fields: tries, err
func (_m *mockValueRetryable[T]) ShouldRetry(tries int, err error) bool {
	ret := _m.Called(tries, err)

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

	var r0 bool
	if rf, ok := ret.Get(0).(func(int, error) bool); ok {
		r0 = rf(tries, err)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

// mockValueRetryable_ShouldRetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldRetry'
type mockValueRetryable_ShouldRetry_Call[T interface{}] struct {
	*mock.Call
}

// ShouldRetry is a helper method to define mock.On call
//   - tries int
//   - err error
func (_e *mockValueRetryable_Expecter[T]) ShouldRetry(tries interface{}, err interface{}) *mockValueRetryable_ShouldRetry_Call[T] {
	return &mockValueRetryable_ShouldRetry_Call[T]{Call: _e.mock.On("ShouldRetry", tries, err)}
}

func (_c *mockValueRetryable_ShouldRetry_Call[T]) Run(run func(tries int, err error)) *mockValueRetryable_ShouldRetry_Call[T] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(int), args[1].(error))
	})
	return _c
}

func (_c *mockValueRetryable_ShouldRetry_Call[T]) Return(_a0 bool) *mockValueRetryable_ShouldRetry_Call[T] {
	_c.Call.Return(_a0)
	return _c
}

func (_c *mockValueRetryable_ShouldRetry_Call[T]) RunAndReturn(run func(int, error) bool) *mockValueRetryable_ShouldRetry_Call[T] {
	_c.Call.Return(run)
	return _c
}

// newMockValueRetryable creates a new instance of mockValueRetryable. 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 newMockValueRetryable[T interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *mockValueRetryable[T] {
	mock := &mockValueRetryable[T]{}
	mock.Mock.Test(t)

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

	return mock
}
