helpers/retry/mock_checkFuncWithPrevious.go (53 lines of code) (raw):
// Code generated by mockery v2.53.3. DO NOT EDIT.
package retry
import mock "github.com/stretchr/testify/mock"
// mockCheckFuncWithPrevious is an autogenerated mock type for the checkFuncWithPrevious type
type mockCheckFuncWithPrevious struct {
mock.Mock
}
type mockCheckFuncWithPrevious_Expecter struct {
mock *mock.Mock
}
func (_m *mockCheckFuncWithPrevious) EXPECT() *mockCheckFuncWithPrevious_Expecter {
return &mockCheckFuncWithPrevious_Expecter{mock: &_m.Mock}
}
// Execute provides a mock function with given fields: tries, err, shouldRetry
func (_m *mockCheckFuncWithPrevious) Execute(tries int, err error, shouldRetry bool) bool {
ret := _m.Called(tries, err, shouldRetry)
if len(ret) == 0 {
panic("no return value specified for Execute")
}
var r0 bool
if rf, ok := ret.Get(0).(func(int, error, bool) bool); ok {
r0 = rf(tries, err, shouldRetry)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// mockCheckFuncWithPrevious_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
type mockCheckFuncWithPrevious_Execute_Call struct {
*mock.Call
}
// Execute is a helper method to define mock.On call
// - tries int
// - err error
// - shouldRetry bool
func (_e *mockCheckFuncWithPrevious_Expecter) Execute(tries interface{}, err interface{}, shouldRetry interface{}) *mockCheckFuncWithPrevious_Execute_Call {
return &mockCheckFuncWithPrevious_Execute_Call{Call: _e.mock.On("Execute", tries, err, shouldRetry)}
}
func (_c *mockCheckFuncWithPrevious_Execute_Call) Run(run func(tries int, err error, shouldRetry bool)) *mockCheckFuncWithPrevious_Execute_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(int), args[1].(error), args[2].(bool))
})
return _c
}
func (_c *mockCheckFuncWithPrevious_Execute_Call) Return(_a0 bool) *mockCheckFuncWithPrevious_Execute_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *mockCheckFuncWithPrevious_Execute_Call) RunAndReturn(run func(int, error, bool) bool) *mockCheckFuncWithPrevious_Execute_Call {
_c.Call.Return(run)
return _c
}
// newMockCheckFuncWithPrevious creates a new instance of mockCheckFuncWithPrevious. 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 newMockCheckFuncWithPrevious(t interface {
mock.TestingT
Cleanup(func())
}) *mockCheckFuncWithPrevious {
mock := &mockCheckFuncWithPrevious{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}