v0.7.3 bcc9a45

LazySource_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package text
6
7import (
8	"io"
9
10	mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockLazySource creates a new instance of MockLazySource. 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 NewMockLazySource(t interface {
16	mock.TestingT
17	Cleanup(func())
18}) *MockLazySource {
19	if helper, ok := t.(interface{ Helper() }); ok {
20		helper.Helper()
21	}
22
23	mock := &MockLazySource{}
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// MockLazySource is an autogenerated mock type for the LazySource type
37type MockLazySource struct {
38	mock.Mock
39}
40
41type MockLazySource_Expecter struct {
42	mock *mock.Mock
43}
44
45func (_m *MockLazySource) EXPECT() *MockLazySource_Expecter {
46	return &MockLazySource_Expecter{mock: &_m.Mock}
47}
48
49// Fonts provides a mock function for the type MockLazySource
50func (_mock *MockLazySource) Fonts() (map[string][]byte, error) {
51	ret := _mock.Called()
52
53	if len(ret) == 0 {
54		panic("no return value specified for Fonts")
55	}
56
57	var r0 map[string][]byte
58	var r1 error
59	if returnFunc, ok := ret.Get(0).(func() (map[string][]byte, error)); ok {
60		return returnFunc()
61	}
62	if returnFunc, ok := ret.Get(0).(func() map[string][]byte); ok {
63		r0 = returnFunc()
64	} else {
65		if ret.Get(0) != nil {
66			r0 = ret.Get(0).(map[string][]byte)
67		}
68	}
69	if returnFunc, ok := ret.Get(1).(func() error); ok {
70		r1 = returnFunc()
71	} else {
72		r1 = ret.Error(1)
73	}
74	return r0, r1
75}
76
77// MockLazySource_Fonts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fonts'
78type MockLazySource_Fonts_Call struct {
79	*mock.Call
80}
81
82// Fonts is a helper method to define mock.On call
83func (_e *MockLazySource_Expecter) Fonts() *MockLazySource_Fonts_Call {
84	return &MockLazySource_Fonts_Call{Call: _e.mock.On("Fonts")}
85}
86
87func (_c *MockLazySource_Fonts_Call) Run(run func()) *MockLazySource_Fonts_Call {
88	_c.Call.Run(func(args mock.Arguments) {
89		run()
90	})
91	return _c
92}
93
94func (_c *MockLazySource_Fonts_Call) Return(stringToBytes map[string][]byte, err error) *MockLazySource_Fonts_Call {
95	_c.Call.Return(stringToBytes, err)
96	return _c
97}
98
99func (_c *MockLazySource_Fonts_Call) RunAndReturn(run func() (map[string][]byte, error)) *MockLazySource_Fonts_Call {
100	_c.Call.Return(run)
101	return _c
102}
103
104// Index provides a mock function for the type MockLazySource
105func (_mock *MockLazySource) Index() ([]FontFile, error) {
106	ret := _mock.Called()
107
108	if len(ret) == 0 {
109		panic("no return value specified for Index")
110	}
111
112	var r0 []FontFile
113	var r1 error
114	if returnFunc, ok := ret.Get(0).(func() ([]FontFile, error)); ok {
115		return returnFunc()
116	}
117	if returnFunc, ok := ret.Get(0).(func() []FontFile); ok {
118		r0 = returnFunc()
119	} else {
120		if ret.Get(0) != nil {
121			r0 = ret.Get(0).([]FontFile)
122		}
123	}
124	if returnFunc, ok := ret.Get(1).(func() error); ok {
125		r1 = returnFunc()
126	} else {
127		r1 = ret.Error(1)
128	}
129	return r0, r1
130}
131
132// MockLazySource_Index_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Index'
133type MockLazySource_Index_Call struct {
134	*mock.Call
135}
136
137// Index is a helper method to define mock.On call
138func (_e *MockLazySource_Expecter) Index() *MockLazySource_Index_Call {
139	return &MockLazySource_Index_Call{Call: _e.mock.On("Index")}
140}
141
142func (_c *MockLazySource_Index_Call) Run(run func()) *MockLazySource_Index_Call {
143	_c.Call.Run(func(args mock.Arguments) {
144		run()
145	})
146	return _c
147}
148
149func (_c *MockLazySource_Index_Call) Return(fontFiles []FontFile, err error) *MockLazySource_Index_Call {
150	_c.Call.Return(fontFiles, err)
151	return _c
152}
153
154func (_c *MockLazySource_Index_Call) RunAndReturn(run func() ([]FontFile, error)) *MockLazySource_Index_Call {
155	_c.Call.Return(run)
156	return _c
157}
158
159// IndexFiles provides a mock function for the type MockLazySource
160func (_mock *MockLazySource) IndexFiles(paths []string) ([]FontFile, error) {
161	ret := _mock.Called(paths)
162
163	if len(ret) == 0 {
164		panic("no return value specified for IndexFiles")
165	}
166
167	var r0 []FontFile
168	var r1 error
169	if returnFunc, ok := ret.Get(0).(func([]string) ([]FontFile, error)); ok {
170		return returnFunc(paths)
171	}
172	if returnFunc, ok := ret.Get(0).(func([]string) []FontFile); ok {
173		r0 = returnFunc(paths)
174	} else {
175		if ret.Get(0) != nil {
176			r0 = ret.Get(0).([]FontFile)
177		}
178	}
179	if returnFunc, ok := ret.Get(1).(func([]string) error); ok {
180		r1 = returnFunc(paths)
181	} else {
182		r1 = ret.Error(1)
183	}
184	return r0, r1
185}
186
187// MockLazySource_IndexFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexFiles'
188type MockLazySource_IndexFiles_Call struct {
189	*mock.Call
190}
191
192// IndexFiles is a helper method to define mock.On call
193//   - paths []string
194func (_e *MockLazySource_Expecter) IndexFiles(paths any) *MockLazySource_IndexFiles_Call {
195	return &MockLazySource_IndexFiles_Call{Call: _e.mock.On("IndexFiles", paths)}
196}
197
198func (_c *MockLazySource_IndexFiles_Call) Run(run func(paths []string)) *MockLazySource_IndexFiles_Call {
199	_c.Call.Run(func(args mock.Arguments) {
200		var arg0 []string
201		if args[0] != nil {
202			arg0 = args[0].([]string)
203		}
204		run(
205			arg0,
206		)
207	})
208	return _c
209}
210
211func (_c *MockLazySource_IndexFiles_Call) Return(fontFiles []FontFile, err error) *MockLazySource_IndexFiles_Call {
212	_c.Call.Return(fontFiles, err)
213	return _c
214}
215
216func (_c *MockLazySource_IndexFiles_Call) RunAndReturn(run func(paths []string) ([]FontFile, error)) *MockLazySource_IndexFiles_Call {
217	_c.Call.Return(run)
218	return _c
219}
220
221// Open provides a mock function for the type MockLazySource
222func (_mock *MockLazySource) Open(path string) (io.ReadCloser, error) {
223	ret := _mock.Called(path)
224
225	if len(ret) == 0 {
226		panic("no return value specified for Open")
227	}
228
229	var r0 io.ReadCloser
230	var r1 error
231	if returnFunc, ok := ret.Get(0).(func(string) (io.ReadCloser, error)); ok {
232		return returnFunc(path)
233	}
234	if returnFunc, ok := ret.Get(0).(func(string) io.ReadCloser); ok {
235		r0 = returnFunc(path)
236	} else {
237		if ret.Get(0) != nil {
238			r0 = ret.Get(0).(io.ReadCloser)
239		}
240	}
241	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
242		r1 = returnFunc(path)
243	} else {
244		r1 = ret.Error(1)
245	}
246	return r0, r1
247}
248
249// MockLazySource_Open_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Open'
250type MockLazySource_Open_Call struct {
251	*mock.Call
252}
253
254// Open is a helper method to define mock.On call
255//   - path string
256func (_e *MockLazySource_Expecter) Open(path any) *MockLazySource_Open_Call {
257	return &MockLazySource_Open_Call{Call: _e.mock.On("Open", path)}
258}
259
260func (_c *MockLazySource_Open_Call) Run(run func(path string)) *MockLazySource_Open_Call {
261	_c.Call.Run(func(args mock.Arguments) {
262		var arg0 string
263		if args[0] != nil {
264			arg0 = args[0].(string)
265		}
266		run(
267			arg0,
268		)
269	})
270	return _c
271}
272
273func (_c *MockLazySource_Open_Call) Return(readCloser io.ReadCloser, err error) *MockLazySource_Open_Call {
274	_c.Call.Return(readCloser, err)
275	return _c
276}
277
278func (_c *MockLazySource_Open_Call) RunAndReturn(run func(path string) (io.ReadCloser, error)) *MockLazySource_Open_Call {
279	_c.Call.Return(run)
280	return _c
281}
282
283// Paths provides a mock function for the type MockLazySource
284func (_mock *MockLazySource) Paths() ([]string, error) {
285	ret := _mock.Called()
286
287	if len(ret) == 0 {
288		panic("no return value specified for Paths")
289	}
290
291	var r0 []string
292	var r1 error
293	if returnFunc, ok := ret.Get(0).(func() ([]string, error)); ok {
294		return returnFunc()
295	}
296	if returnFunc, ok := ret.Get(0).(func() []string); ok {
297		r0 = returnFunc()
298	} else {
299		if ret.Get(0) != nil {
300			r0 = ret.Get(0).([]string)
301		}
302	}
303	if returnFunc, ok := ret.Get(1).(func() error); ok {
304		r1 = returnFunc()
305	} else {
306		r1 = ret.Error(1)
307	}
308	return r0, r1
309}
310
311// MockLazySource_Paths_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Paths'
312type MockLazySource_Paths_Call struct {
313	*mock.Call
314}
315
316// Paths is a helper method to define mock.On call
317func (_e *MockLazySource_Expecter) Paths() *MockLazySource_Paths_Call {
318	return &MockLazySource_Paths_Call{Call: _e.mock.On("Paths")}
319}
320
321func (_c *MockLazySource_Paths_Call) Run(run func()) *MockLazySource_Paths_Call {
322	_c.Call.Run(func(args mock.Arguments) {
323		run()
324	})
325	return _c
326}
327
328func (_c *MockLazySource_Paths_Call) Return(strings []string, err error) *MockLazySource_Paths_Call {
329	_c.Call.Return(strings, err)
330	return _c
331}
332
333func (_c *MockLazySource_Paths_Call) RunAndReturn(run func() ([]string, error)) *MockLazySource_Paths_Call {
334	_c.Call.Return(run)
335	return _c
336}

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