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

package retry

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

// mockRetryable is an autogenerated mock type for the retryable type
type mockRetryable struct {
	mock.Mock
}

type mockRetryable_Expecter struct {
	mock *mock.Mock
}

func (_m *mockRetryable) EXPECT() *mockRetryable_Expecter {
	return &mockRetryable_Expecter{mock: &_m.Mock}
}

// Run provides a mock function with no fields
func (_m *mockRetryable) Run() error {
	ret := _m.Called()

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

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

	return r0
}

// mockRetryable_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
type mockRetryable_Run_Call struct {
	*mock.Call
}

// Run is a helper method to define mock.On call
func (_e *mockRetryable_Expecter) Run() *mockRetryable_Run_Call {
	return &mockRetryable_Run_Call{Call: _e.mock.On("Run")}
}

func (_c *mockRetryable_Run_Call) Run(run func()) *mockRetryable_Run_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *mockRetryable_Run_Call) Return(_a0 error) *mockRetryable_Run_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *mockRetryable_Run_Call) RunAndReturn(run func() error) *mockRetryable_Run_Call {
	_c.Call.Return(run)
	return _c
}

// ShouldRetry provides a mock function with given fields: tries, err
func (_m *mockRetryable) 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
}

// mockRetryable_ShouldRetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShouldRetry'
type mockRetryable_ShouldRetry_Call struct {
	*mock.Call
}

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

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

func (_c *mockRetryable_ShouldRetry_Call) Return(_a0 bool) *mockRetryable_ShouldRetry_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *mockRetryable_ShouldRetry_Call) RunAndReturn(run func(int, error) bool) *mockRetryable_ShouldRetry_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
