v2.1.0 0fb867d

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

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