v0.5.1 657f658

IME_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	mock "github.com/stretchr/testify/mock"
9)
10
11// NewMockIME creates a new instance of MockIME. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
12// The first argument is typically a *testing.T value.
13func NewMockIME(t interface {
14	mock.TestingT
15	Cleanup(func())
16}) *MockIME {
17	if helper, ok := t.(interface{ Helper() }); ok {
18		helper.Helper()
19	}
20
21	mock := &MockIME{}
22	mock.Mock.Test(t)
23
24	t.Cleanup(func() {
25		if helper, ok := t.(interface{ Helper() }); ok {
26			helper.Helper()
27		}
28		mock.AssertExpectations(t)
29	})
30
31	return mock
32}
33
34// MockIME is an autogenerated mock type for the IME type
35type MockIME struct {
36	mock.Mock
37}
38
39type MockIME_Expecter struct {
40	mock *mock.Mock
41}
42
43func (_m *MockIME) EXPECT() *MockIME_Expecter {
44	return &MockIME_Expecter{mock: &_m.Mock}
45}
46
47// ContentType provides a mock function for the type MockIME
48func (_mock *MockIME) ContentType(password bool, multiline bool) {
49	_mock.Called(password, multiline)
50	return
51}
52
53// MockIME_ContentType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContentType'
54type MockIME_ContentType_Call struct {
55	*mock.Call
56}
57
58// ContentType is a helper method to define mock.On call
59//   - password bool
60//   - multiline bool
61func (_e *MockIME_Expecter) ContentType(password any, multiline any) *MockIME_ContentType_Call {
62	return &MockIME_ContentType_Call{Call: _e.mock.On("ContentType", password, multiline)}
63}
64
65func (_c *MockIME_ContentType_Call) Run(run func(password bool, multiline bool)) *MockIME_ContentType_Call {
66	_c.Call.Run(func(args mock.Arguments) {
67		var arg0 bool
68		if args[0] != nil {
69			arg0 = args[0].(bool)
70		}
71		var arg1 bool
72		if args[1] != nil {
73			arg1 = args[1].(bool)
74		}
75		run(
76			arg0,
77			arg1,
78		)
79	})
80	return _c
81}
82
83func (_c *MockIME_ContentType_Call) Return() *MockIME_ContentType_Call {
84	_c.Call.Return()
85	return _c
86}
87
88func (_c *MockIME_ContentType_Call) RunAndReturn(run func(password bool, multiline bool)) *MockIME_ContentType_Call {
89	_c.Run(run)
90	return _c
91}
92
93// CursorRect provides a mock function for the type MockIME
94func (_mock *MockIME) CursorRect(x float64, y float64, w float64, h float64) {
95	_mock.Called(x, y, w, h)
96	return
97}
98
99// MockIME_CursorRect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CursorRect'
100type MockIME_CursorRect_Call struct {
101	*mock.Call
102}
103
104// CursorRect is a helper method to define mock.On call
105//   - x float64
106//   - y float64
107//   - w float64
108//   - h float64
109func (_e *MockIME_Expecter) CursorRect(x any, y any, w any, h any) *MockIME_CursorRect_Call {
110	return &MockIME_CursorRect_Call{Call: _e.mock.On("CursorRect", x, y, w, h)}
111}
112
113func (_c *MockIME_CursorRect_Call) Run(run func(x float64, y float64, w float64, h float64)) *MockIME_CursorRect_Call {
114	_c.Call.Run(func(args mock.Arguments) {
115		var arg0 float64
116		if args[0] != nil {
117			arg0 = args[0].(float64)
118		}
119		var arg1 float64
120		if args[1] != nil {
121			arg1 = args[1].(float64)
122		}
123		var arg2 float64
124		if args[2] != nil {
125			arg2 = args[2].(float64)
126		}
127		var arg3 float64
128		if args[3] != nil {
129			arg3 = args[3].(float64)
130		}
131		run(
132			arg0,
133			arg1,
134			arg2,
135			arg3,
136		)
137	})
138	return _c
139}
140
141func (_c *MockIME_CursorRect_Call) Return() *MockIME_CursorRect_Call {
142	_c.Call.Return()
143	return _c
144}
145
146func (_c *MockIME_CursorRect_Call) RunAndReturn(run func(x float64, y float64, w float64, h float64)) *MockIME_CursorRect_Call {
147	_c.Run(run)
148	return _c
149}
150
151// Disable provides a mock function for the type MockIME
152func (_mock *MockIME) Disable() {
153	_mock.Called()
154	return
155}
156
157// MockIME_Disable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disable'
158type MockIME_Disable_Call struct {
159	*mock.Call
160}
161
162// Disable is a helper method to define mock.On call
163func (_e *MockIME_Expecter) Disable() *MockIME_Disable_Call {
164	return &MockIME_Disable_Call{Call: _e.mock.On("Disable")}
165}
166
167func (_c *MockIME_Disable_Call) Run(run func()) *MockIME_Disable_Call {
168	_c.Call.Run(func(args mock.Arguments) {
169		run()
170	})
171	return _c
172}
173
174func (_c *MockIME_Disable_Call) Return() *MockIME_Disable_Call {
175	_c.Call.Return()
176	return _c
177}
178
179func (_c *MockIME_Disable_Call) RunAndReturn(run func()) *MockIME_Disable_Call {
180	_c.Run(run)
181	return _c
182}
183
184// Enable provides a mock function for the type MockIME
185func (_mock *MockIME) Enable() {
186	_mock.Called()
187	return
188}
189
190// MockIME_Enable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Enable'
191type MockIME_Enable_Call struct {
192	*mock.Call
193}
194
195// Enable is a helper method to define mock.On call
196func (_e *MockIME_Expecter) Enable() *MockIME_Enable_Call {
197	return &MockIME_Enable_Call{Call: _e.mock.On("Enable")}
198}
199
200func (_c *MockIME_Enable_Call) Run(run func()) *MockIME_Enable_Call {
201	_c.Call.Run(func(args mock.Arguments) {
202		run()
203	})
204	return _c
205}
206
207func (_c *MockIME_Enable_Call) Return() *MockIME_Enable_Call {
208	_c.Call.Return()
209	return _c
210}
211
212func (_c *MockIME_Enable_Call) RunAndReturn(run func()) *MockIME_Enable_Call {
213	_c.Run(run)
214	return _c
215}
216
217// Surrounding provides a mock function for the type MockIME
218func (_mock *MockIME) Surrounding(text string, cursor int, anchor int) {
219	_mock.Called(text, cursor, anchor)
220	return
221}
222
223// MockIME_Surrounding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Surrounding'
224type MockIME_Surrounding_Call struct {
225	*mock.Call
226}
227
228// Surrounding is a helper method to define mock.On call
229//   - text string
230//   - cursor int
231//   - anchor int
232func (_e *MockIME_Expecter) Surrounding(text any, cursor any, anchor any) *MockIME_Surrounding_Call {
233	return &MockIME_Surrounding_Call{Call: _e.mock.On("Surrounding", text, cursor, anchor)}
234}
235
236func (_c *MockIME_Surrounding_Call) Run(run func(text string, cursor int, anchor int)) *MockIME_Surrounding_Call {
237	_c.Call.Run(func(args mock.Arguments) {
238		var arg0 string
239		if args[0] != nil {
240			arg0 = args[0].(string)
241		}
242		var arg1 int
243		if args[1] != nil {
244			arg1 = args[1].(int)
245		}
246		var arg2 int
247		if args[2] != nil {
248			arg2 = args[2].(int)
249		}
250		run(
251			arg0,
252			arg1,
253			arg2,
254		)
255	})
256	return _c
257}
258
259func (_c *MockIME_Surrounding_Call) Return() *MockIME_Surrounding_Call {
260	_c.Call.Return()
261	return _c
262}
263
264func (_c *MockIME_Surrounding_Call) RunAndReturn(run func(text string, cursor int, anchor int)) *MockIME_Surrounding_Call {
265	_c.Run(run)
266	return _c
267}

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