v0.2.1 c196c81

visual_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package visual
6
7import (
8	"context"
9	"io"
10
11	"github.com/bnema/nefergui"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// newMockworkerLauncher creates a new instance of mockworkerLauncher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func newMockworkerLauncher(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *mockworkerLauncher {
21	if helper, ok := t.(interface{ Helper() }); ok {
22		helper.Helper()
23	}
24
25	mock := &mockworkerLauncher{}
26	mock.Mock.Test(t)
27
28	t.Cleanup(func() {
29		if helper, ok := t.(interface{ Helper() }); ok {
30			helper.Helper()
31		}
32		mock.AssertExpectations(t)
33	})
34
35	return mock
36}
37
38// mockworkerLauncher is an autogenerated mock type for the workerLauncher type
39type mockworkerLauncher struct {
40	mock.Mock
41}
42
43type mockworkerLauncher_Expecter struct {
44	mock *mock.Mock
45}
46
47func (_m *mockworkerLauncher) EXPECT() *mockworkerLauncher_Expecter {
48	return &mockworkerLauncher_Expecter{mock: &_m.Mock}
49}
50
51// launch provides a mock function for the type mockworkerLauncher
52func (_mock *mockworkerLauncher) launch(ctx context.Context) (workerProcess, error) {
53	ret := _mock.Called(ctx)
54
55	if len(ret) == 0 {
56		panic("no return value specified for launch")
57	}
58
59	var r0 workerProcess
60	var r1 error
61	if returnFunc, ok := ret.Get(0).(func(context.Context) (workerProcess, error)); ok {
62		return returnFunc(ctx)
63	}
64	if returnFunc, ok := ret.Get(0).(func(context.Context) workerProcess); ok {
65		r0 = returnFunc(ctx)
66	} else {
67		if ret.Get(0) != nil {
68			r0 = ret.Get(0).(workerProcess)
69		}
70	}
71	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
72		r1 = returnFunc(ctx)
73	} else {
74		r1 = ret.Error(1)
75	}
76	return r0, r1
77}
78
79// mockworkerLauncher_launch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'launch'
80type mockworkerLauncher_launch_Call struct {
81	*mock.Call
82}
83
84// launch is a helper method to define mock.On call
85//   - ctx context.Context
86func (_e *mockworkerLauncher_Expecter) launch(ctx any) *mockworkerLauncher_launch_Call {
87	return &mockworkerLauncher_launch_Call{Call: _e.mock.On("launch", ctx)}
88}
89
90func (_c *mockworkerLauncher_launch_Call) Run(run func(ctx context.Context)) *mockworkerLauncher_launch_Call {
91	_c.Call.Run(func(args mock.Arguments) {
92		var arg0 context.Context
93		if args[0] != nil {
94			arg0 = args[0].(context.Context)
95		}
96		run(
97			arg0,
98		)
99	})
100	return _c
101}
102
103func (_c *mockworkerLauncher_launch_Call) Return(workerProcessMoqParam workerProcess, err error) *mockworkerLauncher_launch_Call {
104	_c.Call.Return(workerProcessMoqParam, err)
105	return _c
106}
107
108func (_c *mockworkerLauncher_launch_Call) RunAndReturn(run func(ctx context.Context) (workerProcess, error)) *mockworkerLauncher_launch_Call {
109	_c.Call.Return(run)
110	return _c
111}
112
113// newMockworkerProcess creates a new instance of mockworkerProcess. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
114// The first argument is typically a *testing.T value.
115func newMockworkerProcess(t interface {
116	mock.TestingT
117	Cleanup(func())
118}) *mockworkerProcess {
119	if helper, ok := t.(interface{ Helper() }); ok {
120		helper.Helper()
121	}
122
123	mock := &mockworkerProcess{}
124	mock.Mock.Test(t)
125
126	t.Cleanup(func() {
127		if helper, ok := t.(interface{ Helper() }); ok {
128			helper.Helper()
129		}
130		mock.AssertExpectations(t)
131	})
132
133	return mock
134}
135
136// mockworkerProcess is an autogenerated mock type for the workerProcess type
137type mockworkerProcess struct {
138	mock.Mock
139}
140
141type mockworkerProcess_Expecter struct {
142	mock *mock.Mock
143}
144
145func (_m *mockworkerProcess) EXPECT() *mockworkerProcess_Expecter {
146	return &mockworkerProcess_Expecter{mock: &_m.Mock}
147}
148
149// kill provides a mock function for the type mockworkerProcess
150func (_mock *mockworkerProcess) kill() error {
151	ret := _mock.Called()
152
153	if len(ret) == 0 {
154		panic("no return value specified for kill")
155	}
156
157	var r0 error
158	if returnFunc, ok := ret.Get(0).(func() error); ok {
159		r0 = returnFunc()
160	} else {
161		r0 = ret.Error(0)
162	}
163	return r0
164}
165
166// mockworkerProcess_kill_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'kill'
167type mockworkerProcess_kill_Call struct {
168	*mock.Call
169}
170
171// kill is a helper method to define mock.On call
172func (_e *mockworkerProcess_Expecter) kill() *mockworkerProcess_kill_Call {
173	return &mockworkerProcess_kill_Call{Call: _e.mock.On("kill")}
174}
175
176func (_c *mockworkerProcess_kill_Call) Run(run func()) *mockworkerProcess_kill_Call {
177	_c.Call.Run(func(args mock.Arguments) {
178		run()
179	})
180	return _c
181}
182
183func (_c *mockworkerProcess_kill_Call) Return(err error) *mockworkerProcess_kill_Call {
184	_c.Call.Return(err)
185	return _c
186}
187
188func (_c *mockworkerProcess_kill_Call) RunAndReturn(run func() error) *mockworkerProcess_kill_Call {
189	_c.Call.Return(run)
190	return _c
191}
192
193// pipes provides a mock function for the type mockworkerProcess
194func (_mock *mockworkerProcess) pipes() (io.WriteCloser, io.ReadCloser) {
195	ret := _mock.Called()
196
197	if len(ret) == 0 {
198		panic("no return value specified for pipes")
199	}
200
201	var r0 io.WriteCloser
202	var r1 io.ReadCloser
203	if returnFunc, ok := ret.Get(0).(func() (io.WriteCloser, io.ReadCloser)); ok {
204		return returnFunc()
205	}
206	if returnFunc, ok := ret.Get(0).(func() io.WriteCloser); ok {
207		r0 = returnFunc()
208	} else {
209		if ret.Get(0) != nil {
210			r0 = ret.Get(0).(io.WriteCloser)
211		}
212	}
213	if returnFunc, ok := ret.Get(1).(func() io.ReadCloser); ok {
214		r1 = returnFunc()
215	} else {
216		if ret.Get(1) != nil {
217			r1 = ret.Get(1).(io.ReadCloser)
218		}
219	}
220	return r0, r1
221}
222
223// mockworkerProcess_pipes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'pipes'
224type mockworkerProcess_pipes_Call struct {
225	*mock.Call
226}
227
228// pipes is a helper method to define mock.On call
229func (_e *mockworkerProcess_Expecter) pipes() *mockworkerProcess_pipes_Call {
230	return &mockworkerProcess_pipes_Call{Call: _e.mock.On("pipes")}
231}
232
233func (_c *mockworkerProcess_pipes_Call) Run(run func()) *mockworkerProcess_pipes_Call {
234	_c.Call.Run(func(args mock.Arguments) {
235		run()
236	})
237	return _c
238}
239
240func (_c *mockworkerProcess_pipes_Call) Return(stdin io.WriteCloser, stdout io.ReadCloser) *mockworkerProcess_pipes_Call {
241	_c.Call.Return(stdin, stdout)
242	return _c
243}
244
245func (_c *mockworkerProcess_pipes_Call) RunAndReturn(run func() (io.WriteCloser, io.ReadCloser)) *mockworkerProcess_pipes_Call {
246	_c.Call.Return(run)
247	return _c
248}
249
250// wait provides a mock function for the type mockworkerProcess
251func (_mock *mockworkerProcess) wait() error {
252	ret := _mock.Called()
253
254	if len(ret) == 0 {
255		panic("no return value specified for wait")
256	}
257
258	var r0 error
259	if returnFunc, ok := ret.Get(0).(func() error); ok {
260		r0 = returnFunc()
261	} else {
262		r0 = ret.Error(0)
263	}
264	return r0
265}
266
267// mockworkerProcess_wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'wait'
268type mockworkerProcess_wait_Call struct {
269	*mock.Call
270}
271
272// wait is a helper method to define mock.On call
273func (_e *mockworkerProcess_Expecter) wait() *mockworkerProcess_wait_Call {
274	return &mockworkerProcess_wait_Call{Call: _e.mock.On("wait")}
275}
276
277func (_c *mockworkerProcess_wait_Call) Run(run func()) *mockworkerProcess_wait_Call {
278	_c.Call.Run(func(args mock.Arguments) {
279		run()
280	})
281	return _c
282}
283
284func (_c *mockworkerProcess_wait_Call) Return(err error) *mockworkerProcess_wait_Call {
285	_c.Call.Return(err)
286	return _c
287}
288
289func (_c *mockworkerProcess_wait_Call) RunAndReturn(run func() error) *mockworkerProcess_wait_Call {
290	_c.Call.Return(run)
291	return _c
292}
293
294// newMockfadeRunner creates a new instance of mockfadeRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
295// The first argument is typically a *testing.T value.
296func newMockfadeRunner(t interface {
297	mock.TestingT
298	Cleanup(func())
299}) *mockfadeRunner {
300	if helper, ok := t.(interface{ Helper() }); ok {
301		helper.Helper()
302	}
303
304	mock := &mockfadeRunner{}
305	mock.Mock.Test(t)
306
307	t.Cleanup(func() {
308		if helper, ok := t.(interface{ Helper() }); ok {
309			helper.Helper()
310		}
311		mock.AssertExpectations(t)
312	})
313
314	return mock
315}
316
317// mockfadeRunner is an autogenerated mock type for the fadeRunner type
318type mockfadeRunner struct {
319	mock.Mock
320}
321
322type mockfadeRunner_Expecter struct {
323	mock *mock.Mock
324}
325
326func (_m *mockfadeRunner) EXPECT() *mockfadeRunner_Expecter {
327	return &mockfadeRunner_Expecter{mock: &_m.Mock}
328}
329
330// RunFade provides a mock function for the type mockfadeRunner
331func (_mock *mockfadeRunner) RunFade(ctx context.Context, m *fadeModel) error {
332	ret := _mock.Called(ctx, m)
333
334	if len(ret) == 0 {
335		panic("no return value specified for RunFade")
336	}
337
338	var r0 error
339	if returnFunc, ok := ret.Get(0).(func(context.Context, *fadeModel) error); ok {
340		r0 = returnFunc(ctx, m)
341	} else {
342		r0 = ret.Error(0)
343	}
344	return r0
345}
346
347// mockfadeRunner_RunFade_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunFade'
348type mockfadeRunner_RunFade_Call struct {
349	*mock.Call
350}
351
352// RunFade is a helper method to define mock.On call
353//   - ctx context.Context
354//   - m *fadeModel
355func (_e *mockfadeRunner_Expecter) RunFade(ctx any, m any) *mockfadeRunner_RunFade_Call {
356	return &mockfadeRunner_RunFade_Call{Call: _e.mock.On("RunFade", ctx, m)}
357}
358
359func (_c *mockfadeRunner_RunFade_Call) Run(run func(ctx context.Context, m *fadeModel)) *mockfadeRunner_RunFade_Call {
360	_c.Call.Run(func(args mock.Arguments) {
361		var arg0 context.Context
362		if args[0] != nil {
363			arg0 = args[0].(context.Context)
364		}
365		var arg1 *fadeModel
366		if args[1] != nil {
367			arg1 = args[1].(*fadeModel)
368		}
369		run(
370			arg0,
371			arg1,
372		)
373	})
374	return _c
375}
376
377func (_c *mockfadeRunner_RunFade_Call) Return(err error) *mockfadeRunner_RunFade_Call {
378	_c.Call.Return(err)
379	return _c
380}
381
382func (_c *mockfadeRunner_RunFade_Call) RunAndReturn(run func(ctx context.Context, m *fadeModel) error) *mockfadeRunner_RunFade_Call {
383	_c.Call.Return(run)
384	return _c
385}
386
387// newMocklockRunner creates a new instance of mocklockRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
388// The first argument is typically a *testing.T value.
389func newMocklockRunner(t interface {
390	mock.TestingT
391	Cleanup(func())
392}) *mocklockRunner {
393	if helper, ok := t.(interface{ Helper() }); ok {
394		helper.Helper()
395	}
396
397	mock := &mocklockRunner{}
398	mock.Mock.Test(t)
399
400	t.Cleanup(func() {
401		if helper, ok := t.(interface{ Helper() }); ok {
402			helper.Helper()
403		}
404		mock.AssertExpectations(t)
405	})
406
407	return mock
408}
409
410// mocklockRunner is an autogenerated mock type for the lockRunner type
411type mocklockRunner struct {
412	mock.Mock
413}
414
415type mocklockRunner_Expecter struct {
416	mock *mock.Mock
417}
418
419func (_m *mocklockRunner) EXPECT() *mocklockRunner_Expecter {
420	return &mocklockRunner_Expecter{mock: &_m.Mock}
421}
422
423// RunLock provides a mock function for the type mocklockRunner
424func (_mock *mocklockRunner) RunLock(ctx context.Context, cfg nefergui.LockConfig) error {
425	ret := _mock.Called(ctx, cfg)
426
427	if len(ret) == 0 {
428		panic("no return value specified for RunLock")
429	}
430
431	var r0 error
432	if returnFunc, ok := ret.Get(0).(func(context.Context, nefergui.LockConfig) error); ok {
433		r0 = returnFunc(ctx, cfg)
434	} else {
435		r0 = ret.Error(0)
436	}
437	return r0
438}
439
440// mocklockRunner_RunLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunLock'
441type mocklockRunner_RunLock_Call struct {
442	*mock.Call
443}
444
445// RunLock is a helper method to define mock.On call
446//   - ctx context.Context
447//   - cfg nefergui.LockConfig
448func (_e *mocklockRunner_Expecter) RunLock(ctx any, cfg any) *mocklockRunner_RunLock_Call {
449	return &mocklockRunner_RunLock_Call{Call: _e.mock.On("RunLock", ctx, cfg)}
450}
451
452func (_c *mocklockRunner_RunLock_Call) Run(run func(ctx context.Context, cfg nefergui.LockConfig)) *mocklockRunner_RunLock_Call {
453	_c.Call.Run(func(args mock.Arguments) {
454		var arg0 context.Context
455		if args[0] != nil {
456			arg0 = args[0].(context.Context)
457		}
458		var arg1 nefergui.LockConfig
459		if args[1] != nil {
460			arg1 = args[1].(nefergui.LockConfig)
461		}
462		run(
463			arg0,
464			arg1,
465		)
466	})
467	return _c
468}
469
470func (_c *mocklockRunner_RunLock_Call) Return(err error) *mocklockRunner_RunLock_Call {
471	_c.Call.Return(err)
472	return _c
473}
474
475func (_c *mocklockRunner_RunLock_Call) RunAndReturn(run func(ctx context.Context, cfg nefergui.LockConfig) error) *mocklockRunner_RunLock_Call {
476	_c.Call.Return(run)
477	return _c
478}

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