v0.9.0 458251f

contentattacher_mock_test.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package app
6
7import (
8	"github.com/bnema/neferwl/internal/ports"
9	mock "github.com/stretchr/testify/mock"
10)
11
12// newMockcontentAttacher creates a new instance of mockcontentAttacher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
13// The first argument is typically a *testing.T value.
14func newMockcontentAttacher(t interface {
15	mock.TestingT
16	Cleanup(func())
17}) *mockcontentAttacher {
18	if helper, ok := t.(interface{ Helper() }); ok {
19		helper.Helper()
20	}
21
22	mock := &mockcontentAttacher{}
23	mock.Mock.Test(t)
24
25	t.Cleanup(func() {
26		if helper, ok := t.(interface{ Helper() }); ok {
27			helper.Helper()
28		}
29		mock.AssertExpectations(t)
30	})
31
32	return mock
33}
34
35// mockcontentAttacher is an autogenerated mock type for the contentAttacher type
36type mockcontentAttacher struct {
37	mock.Mock
38}
39
40type mockcontentAttacher_Expecter struct {
41	mock *mock.Mock
42}
43
44func (_m *mockcontentAttacher) EXPECT() *mockcontentAttacher_Expecter {
45	return &mockcontentAttacher_Expecter{mock: &_m.Mock}
46}
47
48// AttachOutput provides a mock function for the type mockcontentAttacher
49func (_mock *mockcontentAttacher) AttachOutput(name string) (<-chan *ports.ContentBatch, ports.ContentReturn) {
50	ret := _mock.Called(name)
51
52	if len(ret) == 0 {
53		panic("no return value specified for AttachOutput")
54	}
55
56	var r0 <-chan *ports.ContentBatch
57	var r1 ports.ContentReturn
58	if returnFunc, ok := ret.Get(0).(func(string) (<-chan *ports.ContentBatch, ports.ContentReturn)); ok {
59		return returnFunc(name)
60	}
61	if returnFunc, ok := ret.Get(0).(func(string) <-chan *ports.ContentBatch); ok {
62		r0 = returnFunc(name)
63	} else {
64		if ret.Get(0) != nil {
65			r0 = ret.Get(0).(<-chan *ports.ContentBatch)
66		}
67	}
68	if returnFunc, ok := ret.Get(1).(func(string) ports.ContentReturn); ok {
69		r1 = returnFunc(name)
70	} else {
71		if ret.Get(1) != nil {
72			r1 = ret.Get(1).(ports.ContentReturn)
73		}
74	}
75	return r0, r1
76}
77
78// mockcontentAttacher_AttachOutput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AttachOutput'
79type mockcontentAttacher_AttachOutput_Call struct {
80	*mock.Call
81}
82
83// AttachOutput is a helper method to define mock.On call
84//   - name string
85func (_e *mockcontentAttacher_Expecter) AttachOutput(name any) *mockcontentAttacher_AttachOutput_Call {
86	return &mockcontentAttacher_AttachOutput_Call{Call: _e.mock.On("AttachOutput", name)}
87}
88
89func (_c *mockcontentAttacher_AttachOutput_Call) Run(run func(name string)) *mockcontentAttacher_AttachOutput_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 string
92		if args[0] != nil {
93			arg0 = args[0].(string)
94		}
95		run(
96			arg0,
97		)
98	})
99	return _c
100}
101
102func (_c *mockcontentAttacher_AttachOutput_Call) Return(contentBatchCh <-chan *ports.ContentBatch, contentReturn ports.ContentReturn) *mockcontentAttacher_AttachOutput_Call {
103	_c.Call.Return(contentBatchCh, contentReturn)
104	return _c
105}
106
107func (_c *mockcontentAttacher_AttachOutput_Call) RunAndReturn(run func(name string) (<-chan *ports.ContentBatch, ports.ContentReturn)) *mockcontentAttacher_AttachOutput_Call {
108	_c.Call.Return(run)
109	return _c
110}
111
112// DetachOutput provides a mock function for the type mockcontentAttacher
113func (_mock *mockcontentAttacher) DetachOutput(feed ports.ContentReturn) {
114	_mock.Called(feed)
115	return
116}
117
118// mockcontentAttacher_DetachOutput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetachOutput'
119type mockcontentAttacher_DetachOutput_Call struct {
120	*mock.Call
121}
122
123// DetachOutput is a helper method to define mock.On call
124//   - feed ports.ContentReturn
125func (_e *mockcontentAttacher_Expecter) DetachOutput(feed any) *mockcontentAttacher_DetachOutput_Call {
126	return &mockcontentAttacher_DetachOutput_Call{Call: _e.mock.On("DetachOutput", feed)}
127}
128
129func (_c *mockcontentAttacher_DetachOutput_Call) Run(run func(feed ports.ContentReturn)) *mockcontentAttacher_DetachOutput_Call {
130	_c.Call.Run(func(args mock.Arguments) {
131		var arg0 ports.ContentReturn
132		if args[0] != nil {
133			arg0 = args[0].(ports.ContentReturn)
134		}
135		run(
136			arg0,
137		)
138	})
139	return _c
140}
141
142func (_c *mockcontentAttacher_DetachOutput_Call) Return() *mockcontentAttacher_DetachOutput_Call {
143	_c.Call.Return()
144	return _c
145}
146
147func (_c *mockcontentAttacher_DetachOutput_Call) RunAndReturn(run func(feed ports.ContentReturn)) *mockcontentAttacher_DetachOutput_Call {
148	_c.Run(run)
149	return _c
150}

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 23

Tags 10

↑↓ moveenter openesc close