v0.3.0 0a8834d

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

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 2

Tags 9

↑↓ moveenter openesc close