// Code generated by mockery v2.13.0-beta.1. DO NOT EDIT.

package exec

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

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

// ExecWithFallback provides a mock function with given fields: execFn, fallbackFn
func (_m *RetryableExecutorMock[T]) ExecWithFallback(execFn func() (T, error), fallbackFn func() error) (T, error) {
	ret := _m.Called(execFn, fallbackFn)

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

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

	return r0, r1
}

type NewRetryableExecutorMockT interface {
	mock.TestingT
	Cleanup(func())
}

// NewRetryableExecutorMock creates a new instance of RetryableExecutorMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewRetryableExecutorMock[T interface{}](t NewRetryableExecutorMockT) *RetryableExecutorMock[T] {
	mock := &RetryableExecutorMock[T]{}
	mock.Mock.Test(t)

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

	return mock
}
