v0.33.0 62a09f5

download.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9
10	"github.com/bnema/dumber/internal/application/port"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockDownloadEventHandler creates a new instance of MockDownloadEventHandler. 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 NewMockDownloadEventHandler(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockDownloadEventHandler {
20	mock := &MockDownloadEventHandler{}
21	mock.Mock.Test(t)
22
23	t.Cleanup(func() { mock.AssertExpectations(t) })
24
25	return mock
26}
27
28// MockDownloadEventHandler is an autogenerated mock type for the DownloadEventHandler type
29type MockDownloadEventHandler struct {
30	mock.Mock
31}
32
33type MockDownloadEventHandler_Expecter struct {
34	mock *mock.Mock
35}
36
37func (_m *MockDownloadEventHandler) EXPECT() *MockDownloadEventHandler_Expecter {
38	return &MockDownloadEventHandler_Expecter{mock: &_m.Mock}
39}
40
41// OnDownloadEvent provides a mock function for the type MockDownloadEventHandler
42func (_mock *MockDownloadEventHandler) OnDownloadEvent(ctx context.Context, event port.DownloadEvent) {
43	_mock.Called(ctx, event)
44	return
45}
46
47// MockDownloadEventHandler_OnDownloadEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnDownloadEvent'
48type MockDownloadEventHandler_OnDownloadEvent_Call struct {
49	*mock.Call
50}
51
52// OnDownloadEvent is a helper method to define mock.On call
53//   - ctx context.Context
54//   - event port.DownloadEvent
55func (_e *MockDownloadEventHandler_Expecter) OnDownloadEvent(ctx any, event any) *MockDownloadEventHandler_OnDownloadEvent_Call {
56	return &MockDownloadEventHandler_OnDownloadEvent_Call{Call: _e.mock.On("OnDownloadEvent", ctx, event)}
57}
58
59func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) Run(run func(ctx context.Context, event port.DownloadEvent)) *MockDownloadEventHandler_OnDownloadEvent_Call {
60	_c.Call.Run(func(args mock.Arguments) {
61		var arg0 context.Context
62		if args[0] != nil {
63			arg0 = args[0].(context.Context)
64		}
65		var arg1 port.DownloadEvent
66		if args[1] != nil {
67			arg1 = args[1].(port.DownloadEvent)
68		}
69		run(
70			arg0,
71			arg1,
72		)
73	})
74	return _c
75}
76
77func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) Return() *MockDownloadEventHandler_OnDownloadEvent_Call {
78	_c.Call.Return()
79	return _c
80}
81
82func (_c *MockDownloadEventHandler_OnDownloadEvent_Call) RunAndReturn(run func(ctx context.Context, event port.DownloadEvent)) *MockDownloadEventHandler_OnDownloadEvent_Call {
83	_c.Run(run)
84	return _c
85}
86
87// NewMockDownloadResponse creates a new instance of MockDownloadResponse. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
88// The first argument is typically a *testing.T value.
89func NewMockDownloadResponse(t interface {
90	mock.TestingT
91	Cleanup(func())
92}) *MockDownloadResponse {
93	mock := &MockDownloadResponse{}
94	mock.Mock.Test(t)
95
96	t.Cleanup(func() { mock.AssertExpectations(t) })
97
98	return mock
99}
100
101// MockDownloadResponse is an autogenerated mock type for the DownloadResponse type
102type MockDownloadResponse struct {
103	mock.Mock
104}
105
106type MockDownloadResponse_Expecter struct {
107	mock *mock.Mock
108}
109
110func (_m *MockDownloadResponse) EXPECT() *MockDownloadResponse_Expecter {
111	return &MockDownloadResponse_Expecter{mock: &_m.Mock}
112}
113
114// GetMimeType provides a mock function for the type MockDownloadResponse
115func (_mock *MockDownloadResponse) GetMimeType() string {
116	ret := _mock.Called()
117
118	if len(ret) == 0 {
119		panic("no return value specified for GetMimeType")
120	}
121
122	var r0 string
123	if returnFunc, ok := ret.Get(0).(func() string); ok {
124		r0 = returnFunc()
125	} else {
126		r0 = ret.Get(0).(string)
127	}
128	return r0
129}
130
131// MockDownloadResponse_GetMimeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMimeType'
132type MockDownloadResponse_GetMimeType_Call struct {
133	*mock.Call
134}
135
136// GetMimeType is a helper method to define mock.On call
137func (_e *MockDownloadResponse_Expecter) GetMimeType() *MockDownloadResponse_GetMimeType_Call {
138	return &MockDownloadResponse_GetMimeType_Call{Call: _e.mock.On("GetMimeType")}
139}
140
141func (_c *MockDownloadResponse_GetMimeType_Call) Run(run func()) *MockDownloadResponse_GetMimeType_Call {
142	_c.Call.Run(func(args mock.Arguments) {
143		run()
144	})
145	return _c
146}
147
148func (_c *MockDownloadResponse_GetMimeType_Call) Return(s string) *MockDownloadResponse_GetMimeType_Call {
149	_c.Call.Return(s)
150	return _c
151}
152
153func (_c *MockDownloadResponse_GetMimeType_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetMimeType_Call {
154	_c.Call.Return(run)
155	return _c
156}
157
158// GetSuggestedFilename provides a mock function for the type MockDownloadResponse
159func (_mock *MockDownloadResponse) GetSuggestedFilename() string {
160	ret := _mock.Called()
161
162	if len(ret) == 0 {
163		panic("no return value specified for GetSuggestedFilename")
164	}
165
166	var r0 string
167	if returnFunc, ok := ret.Get(0).(func() string); ok {
168		r0 = returnFunc()
169	} else {
170		r0 = ret.Get(0).(string)
171	}
172	return r0
173}
174
175// MockDownloadResponse_GetSuggestedFilename_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSuggestedFilename'
176type MockDownloadResponse_GetSuggestedFilename_Call struct {
177	*mock.Call
178}
179
180// GetSuggestedFilename is a helper method to define mock.On call
181func (_e *MockDownloadResponse_Expecter) GetSuggestedFilename() *MockDownloadResponse_GetSuggestedFilename_Call {
182	return &MockDownloadResponse_GetSuggestedFilename_Call{Call: _e.mock.On("GetSuggestedFilename")}
183}
184
185func (_c *MockDownloadResponse_GetSuggestedFilename_Call) Run(run func()) *MockDownloadResponse_GetSuggestedFilename_Call {
186	_c.Call.Run(func(args mock.Arguments) {
187		run()
188	})
189	return _c
190}
191
192func (_c *MockDownloadResponse_GetSuggestedFilename_Call) Return(s string) *MockDownloadResponse_GetSuggestedFilename_Call {
193	_c.Call.Return(s)
194	return _c
195}
196
197func (_c *MockDownloadResponse_GetSuggestedFilename_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetSuggestedFilename_Call {
198	_c.Call.Return(run)
199	return _c
200}
201
202// GetUri provides a mock function for the type MockDownloadResponse
203func (_mock *MockDownloadResponse) GetUri() string {
204	ret := _mock.Called()
205
206	if len(ret) == 0 {
207		panic("no return value specified for GetUri")
208	}
209
210	var r0 string
211	if returnFunc, ok := ret.Get(0).(func() string); ok {
212		r0 = returnFunc()
213	} else {
214		r0 = ret.Get(0).(string)
215	}
216	return r0
217}
218
219// MockDownloadResponse_GetUri_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUri'
220type MockDownloadResponse_GetUri_Call struct {
221	*mock.Call
222}
223
224// GetUri is a helper method to define mock.On call
225func (_e *MockDownloadResponse_Expecter) GetUri() *MockDownloadResponse_GetUri_Call {
226	return &MockDownloadResponse_GetUri_Call{Call: _e.mock.On("GetUri")}
227}
228
229func (_c *MockDownloadResponse_GetUri_Call) Run(run func()) *MockDownloadResponse_GetUri_Call {
230	_c.Call.Run(func(args mock.Arguments) {
231		run()
232	})
233	return _c
234}
235
236func (_c *MockDownloadResponse_GetUri_Call) Return(s string) *MockDownloadResponse_GetUri_Call {
237	_c.Call.Return(s)
238	return _c
239}
240
241func (_c *MockDownloadResponse_GetUri_Call) RunAndReturn(run func() string) *MockDownloadResponse_GetUri_Call {
242	_c.Call.Return(run)
243	return _c
244}

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 8

Tags 42

↑↓ moveenter openesc close