v0.3.0 cf370a0

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/neferwl/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	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &MockClock{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// MockClock is an autogenerated mock type for the Clock type
38type MockClock struct {
39	mock.Mock
40}
41
42type MockClock_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *MockClock) EXPECT() *MockClock_Expecter {
47	return &MockClock_Expecter{mock: &_m.Mock}
48}
49
50// AfterFunc provides a mock function for the type MockClock
51func (_mock *MockClock) AfterFunc(d time.Duration, f func()) ports.Timer {
52	ret := _mock.Called(d, f)
53
54	if len(ret) == 0 {
55		panic("no return value specified for AfterFunc")
56	}
57
58	var r0 ports.Timer
59	if returnFunc, ok := ret.Get(0).(func(time.Duration, func()) ports.Timer); ok {
60		r0 = returnFunc(d, f)
61	} else {
62		if ret.Get(0) != nil {
63			r0 = ret.Get(0).(ports.Timer)
64		}
65	}
66	return r0
67}
68
69// MockClock_AfterFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AfterFunc'
70type MockClock_AfterFunc_Call struct {
71	*mock.Call
72}
73
74// AfterFunc is a helper method to define mock.On call
75//   - d time.Duration
76//   - f func()
77func (_e *MockClock_Expecter) AfterFunc(d any, f any) *MockClock_AfterFunc_Call {
78	return &MockClock_AfterFunc_Call{Call: _e.mock.On("AfterFunc", d, f)}
79}
80
81func (_c *MockClock_AfterFunc_Call) Run(run func(d time.Duration, f func())) *MockClock_AfterFunc_Call {
82	_c.Call.Run(func(args mock.Arguments) {
83		var arg0 time.Duration
84		if args[0] != nil {
85			arg0 = args[0].(time.Duration)
86		}
87		var arg1 func()
88		if args[1] != nil {
89			arg1 = args[1].(func())
90		}
91		run(
92			arg0,
93			arg1,
94		)
95	})
96	return _c
97}
98
99func (_c *MockClock_AfterFunc_Call) Return(timer ports.Timer) *MockClock_AfterFunc_Call {
100	_c.Call.Return(timer)
101	return _c
102}
103
104func (_c *MockClock_AfterFunc_Call) RunAndReturn(run func(d time.Duration, f func()) ports.Timer) *MockClock_AfterFunc_Call {
105	_c.Call.Return(run)
106	return _c
107}
108
109// NewTicker provides a mock function for the type MockClock
110func (_mock *MockClock) NewTicker(d time.Duration) ports.Ticker {
111	ret := _mock.Called(d)
112
113	if len(ret) == 0 {
114		panic("no return value specified for NewTicker")
115	}
116
117	var r0 ports.Ticker
118	if returnFunc, ok := ret.Get(0).(func(time.Duration) ports.Ticker); ok {
119		r0 = returnFunc(d)
120	} else {
121		if ret.Get(0) != nil {
122			r0 = ret.Get(0).(ports.Ticker)
123		}
124	}
125	return r0
126}
127
128// MockClock_NewTicker_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewTicker'
129type MockClock_NewTicker_Call struct {
130	*mock.Call
131}
132
133// NewTicker is a helper method to define mock.On call
134//   - d time.Duration
135func (_e *MockClock_Expecter) NewTicker(d any) *MockClock_NewTicker_Call {
136	return &MockClock_NewTicker_Call{Call: _e.mock.On("NewTicker", d)}
137}
138
139func (_c *MockClock_NewTicker_Call) Run(run func(d time.Duration)) *MockClock_NewTicker_Call {
140	_c.Call.Run(func(args mock.Arguments) {
141		var arg0 time.Duration
142		if args[0] != nil {
143			arg0 = args[0].(time.Duration)
144		}
145		run(
146			arg0,
147		)
148	})
149	return _c
150}
151
152func (_c *MockClock_NewTicker_Call) Return(ticker ports.Ticker) *MockClock_NewTicker_Call {
153	_c.Call.Return(ticker)
154	return _c
155}
156
157func (_c *MockClock_NewTicker_Call) RunAndReturn(run func(d time.Duration) ports.Ticker) *MockClock_NewTicker_Call {
158	_c.Call.Return(run)
159	return _c
160}
161
162// NewTimer provides a mock function for the type MockClock
163func (_mock *MockClock) NewTimer(d time.Duration) ports.Timer {
164	ret := _mock.Called(d)
165
166	if len(ret) == 0 {
167		panic("no return value specified for NewTimer")
168	}
169
170	var r0 ports.Timer
171	if returnFunc, ok := ret.Get(0).(func(time.Duration) ports.Timer); ok {
172		r0 = returnFunc(d)
173	} else {
174		if ret.Get(0) != nil {
175			r0 = ret.Get(0).(ports.Timer)
176		}
177	}
178	return r0
179}
180
181// MockClock_NewTimer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewTimer'
182type MockClock_NewTimer_Call struct {
183	*mock.Call
184}
185
186// NewTimer is a helper method to define mock.On call
187//   - d time.Duration
188func (_e *MockClock_Expecter) NewTimer(d any) *MockClock_NewTimer_Call {
189	return &MockClock_NewTimer_Call{Call: _e.mock.On("NewTimer", d)}
190}
191
192func (_c *MockClock_NewTimer_Call) Run(run func(d time.Duration)) *MockClock_NewTimer_Call {
193	_c.Call.Run(func(args mock.Arguments) {
194		var arg0 time.Duration
195		if args[0] != nil {
196			arg0 = args[0].(time.Duration)
197		}
198		run(
199			arg0,
200		)
201	})
202	return _c
203}
204
205func (_c *MockClock_NewTimer_Call) Return(timer ports.Timer) *MockClock_NewTimer_Call {
206	_c.Call.Return(timer)
207	return _c
208}
209
210func (_c *MockClock_NewTimer_Call) RunAndReturn(run func(d time.Duration) ports.Timer) *MockClock_NewTimer_Call {
211	_c.Call.Return(run)
212	return _c
213}
214
215// Now provides a mock function for the type MockClock
216func (_mock *MockClock) Now() time.Time {
217	ret := _mock.Called()
218
219	if len(ret) == 0 {
220		panic("no return value specified for Now")
221	}
222
223	var r0 time.Time
224	if returnFunc, ok := ret.Get(0).(func() time.Time); ok {
225		r0 = returnFunc()
226	} else {
227		r0 = ret.Get(0).(time.Time)
228	}
229	return r0
230}
231
232// MockClock_Now_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Now'
233type MockClock_Now_Call struct {
234	*mock.Call
235}
236
237// Now is a helper method to define mock.On call
238func (_e *MockClock_Expecter) Now() *MockClock_Now_Call {
239	return &MockClock_Now_Call{Call: _e.mock.On("Now")}
240}
241
242func (_c *MockClock_Now_Call) Run(run func()) *MockClock_Now_Call {
243	_c.Call.Run(func(args mock.Arguments) {
244		run()
245	})
246	return _c
247}
248
249func (_c *MockClock_Now_Call) Return(time1 time.Time) *MockClock_Now_Call {
250	_c.Call.Return(time1)
251	return _c
252}
253
254func (_c *MockClock_Now_Call) RunAndReturn(run func() time.Time) *MockClock_Now_Call {
255	_c.Call.Return(run)
256	return _c
257}
258
259// 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.
260// The first argument is typically a *testing.T value.
261func NewMockTimer(t interface {
262	mock.TestingT
263	Cleanup(func())
264}) *MockTimer {
265	if helper, ok := t.(interface{ Helper() }); ok {
266		helper.Helper()
267	}
268
269	mock := &MockTimer{}
270	mock.Mock.Test(t)
271
272	t.Cleanup(func() {
273		if helper, ok := t.(interface{ Helper() }); ok {
274			helper.Helper()
275		}
276		mock.AssertExpectations(t)
277	})
278
279	return mock
280}
281
282// MockTimer is an autogenerated mock type for the Timer type
283type MockTimer struct {
284	mock.Mock
285}
286
287type MockTimer_Expecter struct {
288	mock *mock.Mock
289}
290
291func (_m *MockTimer) EXPECT() *MockTimer_Expecter {
292	return &MockTimer_Expecter{mock: &_m.Mock}
293}
294
295// C provides a mock function for the type MockTimer
296func (_mock *MockTimer) C() <-chan time.Time {
297	ret := _mock.Called()
298
299	if len(ret) == 0 {
300		panic("no return value specified for C")
301	}
302
303	var r0 <-chan time.Time
304	if returnFunc, ok := ret.Get(0).(func() <-chan time.Time); ok {
305		r0 = returnFunc()
306	} else {
307		if ret.Get(0) != nil {
308			r0 = ret.Get(0).(<-chan time.Time)
309		}
310	}
311	return r0
312}
313
314// MockTimer_C_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'C'
315type MockTimer_C_Call struct {
316	*mock.Call
317}
318
319// C is a helper method to define mock.On call
320func (_e *MockTimer_Expecter) C() *MockTimer_C_Call {
321	return &MockTimer_C_Call{Call: _e.mock.On("C")}
322}
323
324func (_c *MockTimer_C_Call) Run(run func()) *MockTimer_C_Call {
325	_c.Call.Run(func(args mock.Arguments) {
326		run()
327	})
328	return _c
329}
330
331func (_c *MockTimer_C_Call) Return(timeCh <-chan time.Time) *MockTimer_C_Call {
332	_c.Call.Return(timeCh)
333	return _c
334}
335
336func (_c *MockTimer_C_Call) RunAndReturn(run func() <-chan time.Time) *MockTimer_C_Call {
337	_c.Call.Return(run)
338	return _c
339}
340
341// Reset provides a mock function for the type MockTimer
342func (_mock *MockTimer) Reset(d time.Duration) bool {
343	ret := _mock.Called(d)
344
345	if len(ret) == 0 {
346		panic("no return value specified for Reset")
347	}
348
349	var r0 bool
350	if returnFunc, ok := ret.Get(0).(func(time.Duration) bool); ok {
351		r0 = returnFunc(d)
352	} else {
353		r0 = ret.Get(0).(bool)
354	}
355	return r0
356}
357
358// MockTimer_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset'
359type MockTimer_Reset_Call struct {
360	*mock.Call
361}
362
363// Reset is a helper method to define mock.On call
364//   - d time.Duration
365func (_e *MockTimer_Expecter) Reset(d any) *MockTimer_Reset_Call {
366	return &MockTimer_Reset_Call{Call: _e.mock.On("Reset", d)}
367}
368
369func (_c *MockTimer_Reset_Call) Run(run func(d time.Duration)) *MockTimer_Reset_Call {
370	_c.Call.Run(func(args mock.Arguments) {
371		var arg0 time.Duration
372		if args[0] != nil {
373			arg0 = args[0].(time.Duration)
374		}
375		run(
376			arg0,
377		)
378	})
379	return _c
380}
381
382func (_c *MockTimer_Reset_Call) Return(b bool) *MockTimer_Reset_Call {
383	_c.Call.Return(b)
384	return _c
385}
386
387func (_c *MockTimer_Reset_Call) RunAndReturn(run func(d time.Duration) bool) *MockTimer_Reset_Call {
388	_c.Call.Return(run)
389	return _c
390}
391
392// Stop provides a mock function for the type MockTimer
393func (_mock *MockTimer) Stop() bool {
394	ret := _mock.Called()
395
396	if len(ret) == 0 {
397		panic("no return value specified for Stop")
398	}
399
400	var r0 bool
401	if returnFunc, ok := ret.Get(0).(func() bool); ok {
402		r0 = returnFunc()
403	} else {
404		r0 = ret.Get(0).(bool)
405	}
406	return r0
407}
408
409// MockTimer_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
410type MockTimer_Stop_Call struct {
411	*mock.Call
412}
413
414// Stop is a helper method to define mock.On call
415func (_e *MockTimer_Expecter) Stop() *MockTimer_Stop_Call {
416	return &MockTimer_Stop_Call{Call: _e.mock.On("Stop")}
417}
418
419func (_c *MockTimer_Stop_Call) Run(run func()) *MockTimer_Stop_Call {
420	_c.Call.Run(func(args mock.Arguments) {
421		run()
422	})
423	return _c
424}
425
426func (_c *MockTimer_Stop_Call) Return(b bool) *MockTimer_Stop_Call {
427	_c.Call.Return(b)
428	return _c
429}
430
431func (_c *MockTimer_Stop_Call) RunAndReturn(run func() bool) *MockTimer_Stop_Call {
432	_c.Call.Return(run)
433	return _c
434}
435
436// NewMockTicker creates a new instance of MockTicker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
437// The first argument is typically a *testing.T value.
438func NewMockTicker(t interface {
439	mock.TestingT
440	Cleanup(func())
441}) *MockTicker {
442	if helper, ok := t.(interface{ Helper() }); ok {
443		helper.Helper()
444	}
445
446	mock := &MockTicker{}
447	mock.Mock.Test(t)
448
449	t.Cleanup(func() {
450		if helper, ok := t.(interface{ Helper() }); ok {
451			helper.Helper()
452		}
453		mock.AssertExpectations(t)
454	})
455
456	return mock
457}
458
459// MockTicker is an autogenerated mock type for the Ticker type
460type MockTicker struct {
461	mock.Mock
462}
463
464type MockTicker_Expecter struct {
465	mock *mock.Mock
466}
467
468func (_m *MockTicker) EXPECT() *MockTicker_Expecter {
469	return &MockTicker_Expecter{mock: &_m.Mock}
470}
471
472// C provides a mock function for the type MockTicker
473func (_mock *MockTicker) C() <-chan time.Time {
474	ret := _mock.Called()
475
476	if len(ret) == 0 {
477		panic("no return value specified for C")
478	}
479
480	var r0 <-chan time.Time
481	if returnFunc, ok := ret.Get(0).(func() <-chan time.Time); ok {
482		r0 = returnFunc()
483	} else {
484		if ret.Get(0) != nil {
485			r0 = ret.Get(0).(<-chan time.Time)
486		}
487	}
488	return r0
489}
490
491// MockTicker_C_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'C'
492type MockTicker_C_Call struct {
493	*mock.Call
494}
495
496// C is a helper method to define mock.On call
497func (_e *MockTicker_Expecter) C() *MockTicker_C_Call {
498	return &MockTicker_C_Call{Call: _e.mock.On("C")}
499}
500
501func (_c *MockTicker_C_Call) Run(run func()) *MockTicker_C_Call {
502	_c.Call.Run(func(args mock.Arguments) {
503		run()
504	})
505	return _c
506}
507
508func (_c *MockTicker_C_Call) Return(timeCh <-chan time.Time) *MockTicker_C_Call {
509	_c.Call.Return(timeCh)
510	return _c
511}
512
513func (_c *MockTicker_C_Call) RunAndReturn(run func() <-chan time.Time) *MockTicker_C_Call {
514	_c.Call.Return(run)
515	return _c
516}
517
518// Stop provides a mock function for the type MockTicker
519func (_mock *MockTicker) Stop() {
520	_mock.Called()
521	return
522}
523
524// MockTicker_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
525type MockTicker_Stop_Call struct {
526	*mock.Call
527}
528
529// Stop is a helper method to define mock.On call
530func (_e *MockTicker_Expecter) Stop() *MockTicker_Stop_Call {
531	return &MockTicker_Stop_Call{Call: _e.mock.On("Stop")}
532}
533
534func (_c *MockTicker_Stop_Call) Run(run func()) *MockTicker_Stop_Call {
535	_c.Call.Run(func(args mock.Arguments) {
536		run()
537	})
538	return _c
539}
540
541func (_c *MockTicker_Stop_Call) Return() *MockTicker_Stop_Call {
542	_c.Call.Return()
543	return _c
544}
545
546func (_c *MockTicker_Stop_Call) RunAndReturn(run func()) *MockTicker_Stop_Call {
547	_c.Run(run)
548	return _c
549}

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 25

Tags 10

↑↓ moveenter openesc close