// Code generated by mockery v2.43.0. 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
}

// Run provides a mock function with given 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 {
		r0 = ret.Get(0).(T)
	}

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

	return r0, r1
}

// 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
}

// 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
}
