v0.32.0 0617278

session_state.go RawHistoryFolder

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

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 8

Tags 42

↑↓ moveenter openesc close