/
back_off_func.go
73 lines (56 loc) · 1.72 KB
/
back_off_func.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
time "time"
mock "github.com/stretchr/testify/mock"
)
// BackOffFunc is an autogenerated mock type for the BackOffFunc type
type BackOffFunc struct {
mock.Mock
}
type BackOffFunc_Expecter struct {
mock *mock.Mock
}
func (_m *BackOffFunc) EXPECT() *BackOffFunc_Expecter {
return &BackOffFunc_Expecter{mock: &_m.Mock}
}
// Execute provides a mock function with given fields:
func (_m *BackOffFunc) Execute() time.Duration {
ret := _m.Called()
var r0 time.Duration
if rf, ok := ret.Get(0).(func() time.Duration); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(time.Duration)
}
return r0
}
// BackOffFunc_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
type BackOffFunc_Execute_Call struct {
*mock.Call
}
// Execute is a helper method to define mock.On call
func (_e *BackOffFunc_Expecter) Execute() *BackOffFunc_Execute_Call {
return &BackOffFunc_Execute_Call{Call: _e.mock.On("Execute")}
}
func (_c *BackOffFunc_Execute_Call) Run(run func()) *BackOffFunc_Execute_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *BackOffFunc_Execute_Call) Return(_a0 time.Duration) *BackOffFunc_Execute_Call {
_c.Call.Return(_a0)
return _c
}
type mockConstructorTestingTNewBackOffFunc interface {
mock.TestingT
Cleanup(func())
}
// NewBackOffFunc creates a new instance of BackOffFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewBackOffFunc(t mockConstructorTestingTNewBackOffFunc) *BackOffFunc {
mock := &BackOffFunc{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}