-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclock_mock_test.go
More file actions
189 lines (161 loc) · 5.95 KB
/
clock_mock_test.go
File metadata and controls
189 lines (161 loc) · 5.95 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
// Package clock is a generated GoMock package.
package clock
import (
context "context"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
time "time"
)
// MockClock is a mock of Clock interface
type MockClock struct {
ctrl *gomock.Controller
recorder *MockClockMockRecorder
}
// MockClockMockRecorder is the mock recorder for MockClock
type MockClockMockRecorder struct {
mock *MockClock
}
// NewMockClock creates a new mock instance
func NewMockClock(ctrl *gomock.Controller) *MockClock {
mock := &MockClock{ctrl: ctrl}
mock.recorder = &MockClockMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockClock) EXPECT() *MockClockMockRecorder {
return m.recorder
}
// After mocks base method
func (m *MockClock) After(d time.Duration) <-chan time.Time {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "After", d)
ret0, _ := ret[0].(<-chan time.Time)
return ret0
}
// After indicates an expected call of After
func (mr *MockClockMockRecorder) After(d interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), d)
}
// AfterFunc mocks base method
func (m *MockClock) AfterFunc(d time.Duration, f func()) *Timer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AfterFunc", d, f)
ret0, _ := ret[0].(*Timer)
return ret0
}
// AfterFunc indicates an expected call of AfterFunc
func (mr *MockClockMockRecorder) AfterFunc(d, f interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterFunc", reflect.TypeOf((*MockClock)(nil).AfterFunc), d, f)
}
// NewTicker mocks base method
func (m *MockClock) NewTicker(d time.Duration) *Ticker {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewTicker", d)
ret0, _ := ret[0].(*Ticker)
return ret0
}
// NewTicker indicates an expected call of NewTicker
func (mr *MockClockMockRecorder) NewTicker(d interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTicker", reflect.TypeOf((*MockClock)(nil).NewTicker), d)
}
// NewTimer mocks base method
func (m *MockClock) NewTimer(d time.Duration) *Timer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewTimer", d)
ret0, _ := ret[0].(*Timer)
return ret0
}
// NewTimer indicates an expected call of NewTimer
func (mr *MockClockMockRecorder) NewTimer(d interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewTimer", reflect.TypeOf((*MockClock)(nil).NewTimer), d)
}
// Now mocks base method
func (m *MockClock) Now() time.Time {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Now")
ret0, _ := ret[0].(time.Time)
return ret0
}
// Now indicates an expected call of Now
func (mr *MockClockMockRecorder) Now() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Now", reflect.TypeOf((*MockClock)(nil).Now))
}
// Since mocks base method
func (m *MockClock) Since(t time.Time) time.Duration {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Since", t)
ret0, _ := ret[0].(time.Duration)
return ret0
}
// Since indicates an expected call of Since
func (mr *MockClockMockRecorder) Since(t interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Since", reflect.TypeOf((*MockClock)(nil).Since), t)
}
// Sleep mocks base method
func (m *MockClock) Sleep(d time.Duration) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Sleep", d)
}
// Sleep indicates an expected call of Sleep
func (mr *MockClockMockRecorder) Sleep(d interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Sleep", reflect.TypeOf((*MockClock)(nil).Sleep), d)
}
// Tick mocks base method
func (m *MockClock) Tick(d time.Duration) <-chan time.Time {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Tick", d)
ret0, _ := ret[0].(<-chan time.Time)
return ret0
}
// Tick indicates an expected call of Tick
func (mr *MockClockMockRecorder) Tick(d interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Tick", reflect.TypeOf((*MockClock)(nil).Tick), d)
}
// Until mocks base method
func (m *MockClock) Until(t time.Time) time.Duration {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Until", t)
ret0, _ := ret[0].(time.Duration)
return ret0
}
// Until indicates an expected call of Until
func (mr *MockClockMockRecorder) Until(t interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Until", reflect.TypeOf((*MockClock)(nil).Until), t)
}
// ContextWithDeadline mocks base method
func (m *MockClock) ContextWithDeadline(parent context.Context, d time.Time) (context.Context, context.CancelFunc) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContextWithDeadline", parent, d)
ret0, _ := ret[0].(context.Context)
ret1, _ := ret[1].(context.CancelFunc)
return ret0, ret1
}
// ContextWithDeadline indicates an expected call of ContextWithDeadline
func (mr *MockClockMockRecorder) ContextWithDeadline(parent, d interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContextWithDeadline", reflect.TypeOf((*MockClock)(nil).ContextWithDeadline), parent, d)
}
// ContextWithTimeout mocks base method
func (m *MockClock) ContextWithTimeout(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContextWithTimeout", parent, timeout)
ret0, _ := ret[0].(context.Context)
ret1, _ := ret[1].(context.CancelFunc)
return ret0, ret1
}
// ContextWithTimeout indicates an expected call of ContextWithTimeout
func (mr *MockClockMockRecorder) ContextWithTimeout(parent, timeout interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContextWithTimeout", reflect.TypeOf((*MockClock)(nil).ContextWithTimeout), parent, timeout)
}