main 8d5c184

mock_event_bus.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	"github.com/bnema/gordon/internal/domain"
10	mock "github.com/stretchr/testify/mock"
11)
12
13// NewMockEventBus creates a new instance of MockEventBus. 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 NewMockEventBus(t interface {
16	mock.TestingT
17	Cleanup(func())
18}) *MockEventBus {
19	if helper, ok := t.(interface{ Helper() }); ok {
20		helper.Helper()
21	}
22
23	mock := &MockEventBus{}
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// MockEventBus is an autogenerated mock type for the EventBus type
37type MockEventBus struct {
38	mock.Mock
39}
40
41type MockEventBus_Expecter struct {
42	mock *mock.Mock
43}
44
45func (_m *MockEventBus) EXPECT() *MockEventBus_Expecter {
46	return &MockEventBus_Expecter{mock: &_m.Mock}
47}
48
49// Publish provides a mock function for the type MockEventBus
50func (_mock *MockEventBus) Publish(eventType domain.EventType, payload any) error {
51	ret := _mock.Called(eventType, payload)
52
53	if len(ret) == 0 {
54		panic("no return value specified for Publish")
55	}
56
57	var r0 error
58	if returnFunc, ok := ret.Get(0).(func(domain.EventType, any) error); ok {
59		r0 = returnFunc(eventType, payload)
60	} else {
61		r0 = ret.Error(0)
62	}
63	return r0
64}
65
66// MockEventBus_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'
67type MockEventBus_Publish_Call struct {
68	*mock.Call
69}
70
71// Publish is a helper method to define mock.On call
72//   - eventType domain.EventType
73//   - payload any
74func (_e *MockEventBus_Expecter) Publish(eventType any, payload any) *MockEventBus_Publish_Call {
75	return &MockEventBus_Publish_Call{Call: _e.mock.On("Publish", eventType, payload)}
76}
77
78func (_c *MockEventBus_Publish_Call) Run(run func(eventType domain.EventType, payload any)) *MockEventBus_Publish_Call {
79	_c.Call.Run(func(args mock.Arguments) {
80		var arg0 domain.EventType
81		if args[0] != nil {
82			arg0 = args[0].(domain.EventType)
83		}
84		var arg1 any
85		if args[1] != nil {
86			arg1 = args[1].(any)
87		}
88		run(
89			arg0,
90			arg1,
91		)
92	})
93	return _c
94}
95
96func (_c *MockEventBus_Publish_Call) Return(err error) *MockEventBus_Publish_Call {
97	_c.Call.Return(err)
98	return _c
99}
100
101func (_c *MockEventBus_Publish_Call) RunAndReturn(run func(eventType domain.EventType, payload any) error) *MockEventBus_Publish_Call {
102	_c.Call.Return(run)
103	return _c
104}
105
106// Start provides a mock function for the type MockEventBus
107func (_mock *MockEventBus) Start() error {
108	ret := _mock.Called()
109
110	if len(ret) == 0 {
111		panic("no return value specified for Start")
112	}
113
114	var r0 error
115	if returnFunc, ok := ret.Get(0).(func() error); ok {
116		r0 = returnFunc()
117	} else {
118		r0 = ret.Error(0)
119	}
120	return r0
121}
122
123// MockEventBus_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
124type MockEventBus_Start_Call struct {
125	*mock.Call
126}
127
128// Start is a helper method to define mock.On call
129func (_e *MockEventBus_Expecter) Start() *MockEventBus_Start_Call {
130	return &MockEventBus_Start_Call{Call: _e.mock.On("Start")}
131}
132
133func (_c *MockEventBus_Start_Call) Run(run func()) *MockEventBus_Start_Call {
134	_c.Call.Run(func(args mock.Arguments) {
135		run()
136	})
137	return _c
138}
139
140func (_c *MockEventBus_Start_Call) Return(err error) *MockEventBus_Start_Call {
141	_c.Call.Return(err)
142	return _c
143}
144
145func (_c *MockEventBus_Start_Call) RunAndReturn(run func() error) *MockEventBus_Start_Call {
146	_c.Call.Return(run)
147	return _c
148}
149
150// Stop provides a mock function for the type MockEventBus
151func (_mock *MockEventBus) Stop() error {
152	ret := _mock.Called()
153
154	if len(ret) == 0 {
155		panic("no return value specified for Stop")
156	}
157
158	var r0 error
159	if returnFunc, ok := ret.Get(0).(func() error); ok {
160		r0 = returnFunc()
161	} else {
162		r0 = ret.Error(0)
163	}
164	return r0
165}
166
167// MockEventBus_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
168type MockEventBus_Stop_Call struct {
169	*mock.Call
170}
171
172// Stop is a helper method to define mock.On call
173func (_e *MockEventBus_Expecter) Stop() *MockEventBus_Stop_Call {
174	return &MockEventBus_Stop_Call{Call: _e.mock.On("Stop")}
175}
176
177func (_c *MockEventBus_Stop_Call) Run(run func()) *MockEventBus_Stop_Call {
178	_c.Call.Run(func(args mock.Arguments) {
179		run()
180	})
181	return _c
182}
183
184func (_c *MockEventBus_Stop_Call) Return(err error) *MockEventBus_Stop_Call {
185	_c.Call.Return(err)
186	return _c
187}
188
189func (_c *MockEventBus_Stop_Call) RunAndReturn(run func() error) *MockEventBus_Stop_Call {
190	_c.Call.Return(run)
191	return _c
192}
193
194// Subscribe provides a mock function for the type MockEventBus
195func (_mock *MockEventBus) Subscribe(handler out.EventHandler) error {
196	ret := _mock.Called(handler)
197
198	if len(ret) == 0 {
199		panic("no return value specified for Subscribe")
200	}
201
202	var r0 error
203	if returnFunc, ok := ret.Get(0).(func(out.EventHandler) error); ok {
204		r0 = returnFunc(handler)
205	} else {
206		r0 = ret.Error(0)
207	}
208	return r0
209}
210
211// MockEventBus_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe'
212type MockEventBus_Subscribe_Call struct {
213	*mock.Call
214}
215
216// Subscribe is a helper method to define mock.On call
217//   - handler out.EventHandler
218func (_e *MockEventBus_Expecter) Subscribe(handler any) *MockEventBus_Subscribe_Call {
219	return &MockEventBus_Subscribe_Call{Call: _e.mock.On("Subscribe", handler)}
220}
221
222func (_c *MockEventBus_Subscribe_Call) Run(run func(handler out.EventHandler)) *MockEventBus_Subscribe_Call {
223	_c.Call.Run(func(args mock.Arguments) {
224		var arg0 out.EventHandler
225		if args[0] != nil {
226			arg0 = args[0].(out.EventHandler)
227		}
228		run(
229			arg0,
230		)
231	})
232	return _c
233}
234
235func (_c *MockEventBus_Subscribe_Call) Return(err error) *MockEventBus_Subscribe_Call {
236	_c.Call.Return(err)
237	return _c
238}
239
240func (_c *MockEventBus_Subscribe_Call) RunAndReturn(run func(handler out.EventHandler) error) *MockEventBus_Subscribe_Call {
241	_c.Call.Return(run)
242	return _c
243}
244
245// Unsubscribe provides a mock function for the type MockEventBus
246func (_mock *MockEventBus) Unsubscribe(handler out.EventHandler) error {
247	ret := _mock.Called(handler)
248
249	if len(ret) == 0 {
250		panic("no return value specified for Unsubscribe")
251	}
252
253	var r0 error
254	if returnFunc, ok := ret.Get(0).(func(out.EventHandler) error); ok {
255		r0 = returnFunc(handler)
256	} else {
257		r0 = ret.Error(0)
258	}
259	return r0
260}
261
262// MockEventBus_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe'
263type MockEventBus_Unsubscribe_Call struct {
264	*mock.Call
265}
266
267// Unsubscribe is a helper method to define mock.On call
268//   - handler out.EventHandler
269func (_e *MockEventBus_Expecter) Unsubscribe(handler any) *MockEventBus_Unsubscribe_Call {
270	return &MockEventBus_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe", handler)}
271}
272
273func (_c *MockEventBus_Unsubscribe_Call) Run(run func(handler out.EventHandler)) *MockEventBus_Unsubscribe_Call {
274	_c.Call.Run(func(args mock.Arguments) {
275		var arg0 out.EventHandler
276		if args[0] != nil {
277			arg0 = args[0].(out.EventHandler)
278		}
279		run(
280			arg0,
281		)
282	})
283	return _c
284}
285
286func (_c *MockEventBus_Unsubscribe_Call) Return(err error) *MockEventBus_Unsubscribe_Call {
287	_c.Call.Return(err)
288	return _c
289}
290
291func (_c *MockEventBus_Unsubscribe_Call) RunAndReturn(run func(handler out.EventHandler) error) *MockEventBus_Unsubscribe_Call {
292	_c.Call.Return(run)
293	return _c
294}

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