v0.7.2 71ebe61

target_mock_test.go RawHistoryFolder

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

Tags 12

↑↓ moveenter openesc close