v0.2.0 80c61e3

clock_mock.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package portsmocks
6
7import (
8	"time"
9
10	"github.com/bnema/vev/internal/ports"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockClock creates a new instance of MockClock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockClock(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockClock {
20	mock := &MockClock{}
21	mock.Mock.Test(t)
22
23	t.Cleanup(func() { mock.AssertExpectations(t) })
24
25	return mock
26}
27
28// MockClock is an autogenerated mock type for the Clock type
29type MockClock struct {
30	mock.Mock
31}
32
33type MockClock_Expecter struct {
34	mock *mock.Mock
35}
36
37func (_m *MockClock) EXPECT() *MockClock_Expecter {
38	return &MockClock_Expecter{mock: &_m.Mock}
39}
40
41// NewTimer provides a mock function for the type MockClock
42func (_mock *MockClock) NewTimer(d time.Duration) ports.Timer {
43	ret := _mock.Called(d)
44
45	if len(ret) == 0 {
46		panic("no return value specified for NewTimer")
47	}
48
49	var r0 ports.Timer
50	if returnFunc, ok := ret.Get(0).(func(time.Duration) ports.Timer); ok {
51		r0 = returnFunc(d)
52	} else {
53		if ret.Get(0) != nil {
54			r0 = ret.Get(0).(ports.Timer)
55		}
56	}
57	return r0
58}
59
60// MockClock_NewTimer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewTimer'
61type MockClock_NewTimer_Call struct {
62	*mock.Call
63}
64
65// NewTimer is a helper method to define mock.On call
66//   - d time.Duration
67func (_e *MockClock_Expecter) NewTimer(d any) *MockClock_NewTimer_Call {
68	return &MockClock_NewTimer_Call{Call: _e.mock.On("NewTimer", d)}
69}
70
71func (_c *MockClock_NewTimer_Call) Run(run func(d time.Duration)) *MockClock_NewTimer_Call {
72	_c.Call.Run(func(args mock.Arguments) {
73		var arg0 time.Duration
74		if args[0] != nil {
75			arg0 = args[0].(time.Duration)
76		}
77		run(
78			arg0,
79		)
80	})
81	return _c
82}
83
84func (_c *MockClock_NewTimer_Call) Return(timer ports.Timer) *MockClock_NewTimer_Call {
85	_c.Call.Return(timer)
86	return _c
87}
88
89func (_c *MockClock_NewTimer_Call) RunAndReturn(run func(d time.Duration) ports.Timer) *MockClock_NewTimer_Call {
90	_c.Call.Return(run)
91	return _c
92}
93
94// Now provides a mock function for the type MockClock
95func (_mock *MockClock) Now() time.Time {
96	ret := _mock.Called()
97
98	if len(ret) == 0 {
99		panic("no return value specified for Now")
100	}
101
102	var r0 time.Time
103	if returnFunc, ok := ret.Get(0).(func() time.Time); ok {
104		r0 = returnFunc()
105	} else {
106		r0 = ret.Get(0).(time.Time)
107	}
108	return r0
109}
110
111// MockClock_Now_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Now'
112type MockClock_Now_Call struct {
113	*mock.Call
114}
115
116// Now is a helper method to define mock.On call
117func (_e *MockClock_Expecter) Now() *MockClock_Now_Call {
118	return &MockClock_Now_Call{Call: _e.mock.On("Now")}
119}
120
121func (_c *MockClock_Now_Call) Run(run func()) *MockClock_Now_Call {
122	_c.Call.Run(func(args mock.Arguments) {
123		run()
124	})
125	return _c
126}
127
128func (_c *MockClock_Now_Call) Return(time1 time.Time) *MockClock_Now_Call {
129	_c.Call.Return(time1)
130	return _c
131}
132
133func (_c *MockClock_Now_Call) RunAndReturn(run func() time.Time) *MockClock_Now_Call {
134	_c.Call.Return(run)
135	return _c
136}
137
138// NewMockTimer creates a new instance of MockTimer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
139// The first argument is typically a *testing.T value.
140func NewMockTimer(t interface {
141	mock.TestingT
142	Cleanup(func())
143}) *MockTimer {
144	mock := &MockTimer{}
145	mock.Mock.Test(t)
146
147	t.Cleanup(func() { mock.AssertExpectations(t) })
148
149	return mock
150}
151
152// MockTimer is an autogenerated mock type for the Timer type
153type MockTimer struct {
154	mock.Mock
155}
156
157type MockTimer_Expecter struct {
158	mock *mock.Mock
159}
160
161func (_m *MockTimer) EXPECT() *MockTimer_Expecter {
162	return &MockTimer_Expecter{mock: &_m.Mock}
163}
164
165// C provides a mock function for the type MockTimer
166func (_mock *MockTimer) C() <-chan time.Time {
167	ret := _mock.Called()
168
169	if len(ret) == 0 {
170		panic("no return value specified for C")
171	}
172
173	var r0 <-chan time.Time
174	if returnFunc, ok := ret.Get(0).(func() <-chan time.Time); ok {
175		r0 = returnFunc()
176	} else {
177		if ret.Get(0) != nil {
178			r0 = ret.Get(0).(<-chan time.Time)
179		}
180	}
181	return r0
182}
183
184// MockTimer_C_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'C'
185type MockTimer_C_Call struct {
186	*mock.Call
187}
188
189// C is a helper method to define mock.On call
190func (_e *MockTimer_Expecter) C() *MockTimer_C_Call {
191	return &MockTimer_C_Call{Call: _e.mock.On("C")}
192}
193
194func (_c *MockTimer_C_Call) Run(run func()) *MockTimer_C_Call {
195	_c.Call.Run(func(args mock.Arguments) {
196		run()
197	})
198	return _c
199}
200
201func (_c *MockTimer_C_Call) Return(timeCh <-chan time.Time) *MockTimer_C_Call {
202	_c.Call.Return(timeCh)
203	return _c
204}
205
206func (_c *MockTimer_C_Call) RunAndReturn(run func() <-chan time.Time) *MockTimer_C_Call {
207	_c.Call.Return(run)
208	return _c
209}
210
211// Reset provides a mock function for the type MockTimer
212func (_mock *MockTimer) Reset(d time.Duration) bool {
213	ret := _mock.Called(d)
214
215	if len(ret) == 0 {
216		panic("no return value specified for Reset")
217	}
218
219	var r0 bool
220	if returnFunc, ok := ret.Get(0).(func(time.Duration) bool); ok {
221		r0 = returnFunc(d)
222	} else {
223		r0 = ret.Get(0).(bool)
224	}
225	return r0
226}
227
228// MockTimer_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset'
229type MockTimer_Reset_Call struct {
230	*mock.Call
231}
232
233// Reset is a helper method to define mock.On call
234//   - d time.Duration
235func (_e *MockTimer_Expecter) Reset(d any) *MockTimer_Reset_Call {
236	return &MockTimer_Reset_Call{Call: _e.mock.On("Reset", d)}
237}
238
239func (_c *MockTimer_Reset_Call) Run(run func(d time.Duration)) *MockTimer_Reset_Call {
240	_c.Call.Run(func(args mock.Arguments) {
241		var arg0 time.Duration
242		if args[0] != nil {
243			arg0 = args[0].(time.Duration)
244		}
245		run(
246			arg0,
247		)
248	})
249	return _c
250}
251
252func (_c *MockTimer_Reset_Call) Return(b bool) *MockTimer_Reset_Call {
253	_c.Call.Return(b)
254	return _c
255}
256
257func (_c *MockTimer_Reset_Call) RunAndReturn(run func(d time.Duration) bool) *MockTimer_Reset_Call {
258	_c.Call.Return(run)
259	return _c
260}
261
262// Stop provides a mock function for the type MockTimer
263func (_mock *MockTimer) Stop() bool {
264	ret := _mock.Called()
265
266	if len(ret) == 0 {
267		panic("no return value specified for Stop")
268	}
269
270	var r0 bool
271	if returnFunc, ok := ret.Get(0).(func() bool); ok {
272		r0 = returnFunc()
273	} else {
274		r0 = ret.Get(0).(bool)
275	}
276	return r0
277}
278
279// MockTimer_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
280type MockTimer_Stop_Call struct {
281	*mock.Call
282}
283
284// Stop is a helper method to define mock.On call
285func (_e *MockTimer_Expecter) Stop() *MockTimer_Stop_Call {
286	return &MockTimer_Stop_Call{Call: _e.mock.On("Stop")}
287}
288
289func (_c *MockTimer_Stop_Call) Run(run func()) *MockTimer_Stop_Call {
290	_c.Call.Run(func(args mock.Arguments) {
291		run()
292	})
293	return _c
294}
295
296func (_c *MockTimer_Stop_Call) Return(b bool) *MockTimer_Stop_Call {
297	_c.Call.Return(b)
298	return _c
299}
300
301func (_c *MockTimer_Stop_Call) RunAndReturn(run func() bool) *MockTimer_Stop_Call {
302	_c.Call.Return(run)
303	return _c
304}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close