v2.10.1 43db1bb

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