v2.31.0-dev21 b59533b

mock_event_subscriber.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"github.com/bnema/gordon/internal/boundaries/out"
9	mock "github.com/stretchr/testify/mock"
10)
11
12// NewMockEventSubscriber creates a new instance of MockEventSubscriber. 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 NewMockEventSubscriber(t interface {
15	mock.TestingT
16	Cleanup(func())
17}) *MockEventSubscriber {
18	mock := &MockEventSubscriber{}
19	mock.Mock.Test(t)
20
21	t.Cleanup(func() { mock.AssertExpectations(t) })
22
23	return mock
24}
25
26// MockEventSubscriber is an autogenerated mock type for the EventSubscriber type
27type MockEventSubscriber struct {
28	mock.Mock
29}
30
31type MockEventSubscriber_Expecter struct {
32	mock *mock.Mock
33}
34
35func (_m *MockEventSubscriber) EXPECT() *MockEventSubscriber_Expecter {
36	return &MockEventSubscriber_Expecter{mock: &_m.Mock}
37}
38
39// Subscribe provides a mock function for the type MockEventSubscriber
40func (_mock *MockEventSubscriber) Subscribe(handler out.EventHandler) error {
41	ret := _mock.Called(handler)
42
43	if len(ret) == 0 {
44		panic("no return value specified for Subscribe")
45	}
46
47	var r0 error
48	if returnFunc, ok := ret.Get(0).(func(out.EventHandler) error); ok {
49		r0 = returnFunc(handler)
50	} else {
51		r0 = ret.Error(0)
52	}
53	return r0
54}
55
56// MockEventSubscriber_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe'
57type MockEventSubscriber_Subscribe_Call struct {
58	*mock.Call
59}
60
61// Subscribe is a helper method to define mock.On call
62//   - handler out.EventHandler
63func (_e *MockEventSubscriber_Expecter) Subscribe(handler interface{}) *MockEventSubscriber_Subscribe_Call {
64	return &MockEventSubscriber_Subscribe_Call{Call: _e.mock.On("Subscribe", handler)}
65}
66
67func (_c *MockEventSubscriber_Subscribe_Call) Run(run func(handler out.EventHandler)) *MockEventSubscriber_Subscribe_Call {
68	_c.Call.Run(func(args mock.Arguments) {
69		var arg0 out.EventHandler
70		if args[0] != nil {
71			arg0 = args[0].(out.EventHandler)
72		}
73		run(
74			arg0,
75		)
76	})
77	return _c
78}
79
80func (_c *MockEventSubscriber_Subscribe_Call) Return(err error) *MockEventSubscriber_Subscribe_Call {
81	_c.Call.Return(err)
82	return _c
83}
84
85func (_c *MockEventSubscriber_Subscribe_Call) RunAndReturn(run func(handler out.EventHandler) error) *MockEventSubscriber_Subscribe_Call {
86	_c.Call.Return(run)
87	return _c
88}
89
90// Unsubscribe provides a mock function for the type MockEventSubscriber
91func (_mock *MockEventSubscriber) Unsubscribe(handler out.EventHandler) error {
92	ret := _mock.Called(handler)
93
94	if len(ret) == 0 {
95		panic("no return value specified for Unsubscribe")
96	}
97
98	var r0 error
99	if returnFunc, ok := ret.Get(0).(func(out.EventHandler) error); ok {
100		r0 = returnFunc(handler)
101	} else {
102		r0 = ret.Error(0)
103	}
104	return r0
105}
106
107// MockEventSubscriber_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe'
108type MockEventSubscriber_Unsubscribe_Call struct {
109	*mock.Call
110}
111
112// Unsubscribe is a helper method to define mock.On call
113//   - handler out.EventHandler
114func (_e *MockEventSubscriber_Expecter) Unsubscribe(handler interface{}) *MockEventSubscriber_Unsubscribe_Call {
115	return &MockEventSubscriber_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", handler)}
116}
117
118func (_c *MockEventSubscriber_Unsubscribe_Call) Run(run func(handler out.EventHandler)) *MockEventSubscriber_Unsubscribe_Call {
119	_c.Call.Run(func(args mock.Arguments) {
120		var arg0 out.EventHandler
121		if args[0] != nil {
122			arg0 = args[0].(out.EventHandler)
123		}
124		run(
125			arg0,
126		)
127	})
128	return _c
129}
130
131func (_c *MockEventSubscriber_Unsubscribe_Call) Return(err error) *MockEventSubscriber_Unsubscribe_Call {
132	_c.Call.Return(err)
133	return _c
134}
135
136func (_c *MockEventSubscriber_Unsubscribe_Call) RunAndReturn(run func(handler out.EventHandler) error) *MockEventSubscriber_Unsubscribe_Call {
137	_c.Call.Return(run)
138	return _c
139}

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 7

Tags 106

↑↓ moveenter openesc close