v2.31.0-dev10 f49cffc

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

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