v3.3.2 9697f9d

mock_app_state_reader.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/gordon/internal/domain"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockAppStateReader creates a new instance of MockAppStateReader. 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 NewMockAppStateReader(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockAppStateReader {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &MockAppStateReader{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// MockAppStateReader is an autogenerated mock type for the AppStateReader type
38type MockAppStateReader struct {
39	mock.Mock
40}
41
42type MockAppStateReader_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *MockAppStateReader) EXPECT() *MockAppStateReader_Expecter {
47	return &MockAppStateReader_Expecter{mock: &_m.Mock}
48}
49
50// ListApps provides a mock function for the type MockAppStateReader
51func (_mock *MockAppStateReader) ListApps(ctx context.Context) ([]string, error) {
52	ret := _mock.Called(ctx)
53
54	if len(ret) == 0 {
55		panic("no return value specified for ListApps")
56	}
57
58	var r0 []string
59	var r1 error
60	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
61		return returnFunc(ctx)
62	}
63	if returnFunc, ok := ret.Get(0).(func(context.Context) []string); ok {
64		r0 = returnFunc(ctx)
65	} else {
66		if ret.Get(0) != nil {
67			r0 = ret.Get(0).([]string)
68		}
69	}
70	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
71		r1 = returnFunc(ctx)
72	} else {
73		r1 = ret.Error(1)
74	}
75	return r0, r1
76}
77
78// MockAppStateReader_ListApps_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListApps'
79type MockAppStateReader_ListApps_Call struct {
80	*mock.Call
81}
82
83// ListApps is a helper method to define mock.On call
84//   - ctx context.Context
85func (_e *MockAppStateReader_Expecter) ListApps(ctx any) *MockAppStateReader_ListApps_Call {
86	return &MockAppStateReader_ListApps_Call{Call: _e.mock.On("ListApps", ctx)}
87}
88
89func (_c *MockAppStateReader_ListApps_Call) Run(run func(ctx context.Context)) *MockAppStateReader_ListApps_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 context.Context
92		if args[0] != nil {
93			arg0 = args[0].(context.Context)
94		}
95		run(
96			arg0,
97		)
98	})
99	return _c
100}
101
102func (_c *MockAppStateReader_ListApps_Call) Return(strings []string, err error) *MockAppStateReader_ListApps_Call {
103	_c.Call.Return(strings, err)
104	return _c
105}
106
107func (_c *MockAppStateReader_ListApps_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockAppStateReader_ListApps_Call {
108	_c.Call.Return(run)
109	return _c
110}
111
112// LoadActive provides a mock function for the type MockAppStateReader
113func (_mock *MockAppStateReader) LoadActive(ctx context.Context, app string) (domain.AppActive, bool, error) {
114	ret := _mock.Called(ctx, app)
115
116	if len(ret) == 0 {
117		panic("no return value specified for LoadActive")
118	}
119
120	var r0 domain.AppActive
121	var r1 bool
122	var r2 error
123	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppActive, bool, error)); ok {
124		return returnFunc(ctx, app)
125	}
126	if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppActive); ok {
127		r0 = returnFunc(ctx, app)
128	} else {
129		r0 = ret.Get(0).(domain.AppActive)
130	}
131	if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok {
132		r1 = returnFunc(ctx, app)
133	} else {
134		r1 = ret.Get(1).(bool)
135	}
136	if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok {
137		r2 = returnFunc(ctx, app)
138	} else {
139		r2 = ret.Error(2)
140	}
141	return r0, r1, r2
142}
143
144// MockAppStateReader_LoadActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadActive'
145type MockAppStateReader_LoadActive_Call struct {
146	*mock.Call
147}
148
149// LoadActive is a helper method to define mock.On call
150//   - ctx context.Context
151//   - app string
152func (_e *MockAppStateReader_Expecter) LoadActive(ctx any, app any) *MockAppStateReader_LoadActive_Call {
153	return &MockAppStateReader_LoadActive_Call{Call: _e.mock.On("LoadActive", ctx, app)}
154}
155
156func (_c *MockAppStateReader_LoadActive_Call) Run(run func(ctx context.Context, app string)) *MockAppStateReader_LoadActive_Call {
157	_c.Call.Run(func(args mock.Arguments) {
158		var arg0 context.Context
159		if args[0] != nil {
160			arg0 = args[0].(context.Context)
161		}
162		var arg1 string
163		if args[1] != nil {
164			arg1 = args[1].(string)
165		}
166		run(
167			arg0,
168			arg1,
169		)
170	})
171	return _c
172}
173
174func (_c *MockAppStateReader_LoadActive_Call) Return(appActive domain.AppActive, b bool, err error) *MockAppStateReader_LoadActive_Call {
175	_c.Call.Return(appActive, b, err)
176	return _c
177}
178
179func (_c *MockAppStateReader_LoadActive_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppActive, bool, error)) *MockAppStateReader_LoadActive_Call {
180	_c.Call.Return(run)
181	return _c
182}
183
184// LoadIntent provides a mock function for the type MockAppStateReader
185func (_mock *MockAppStateReader) LoadIntent(ctx context.Context, app string) (domain.AppStopIntent, error) {
186	ret := _mock.Called(ctx, app)
187
188	if len(ret) == 0 {
189		panic("no return value specified for LoadIntent")
190	}
191
192	var r0 domain.AppStopIntent
193	var r1 error
194	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppStopIntent, error)); ok {
195		return returnFunc(ctx, app)
196	}
197	if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppStopIntent); ok {
198		r0 = returnFunc(ctx, app)
199	} else {
200		r0 = ret.Get(0).(domain.AppStopIntent)
201	}
202	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
203		r1 = returnFunc(ctx, app)
204	} else {
205		r1 = ret.Error(1)
206	}
207	return r0, r1
208}
209
210// MockAppStateReader_LoadIntent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadIntent'
211type MockAppStateReader_LoadIntent_Call struct {
212	*mock.Call
213}
214
215// LoadIntent is a helper method to define mock.On call
216//   - ctx context.Context
217//   - app string
218func (_e *MockAppStateReader_Expecter) LoadIntent(ctx any, app any) *MockAppStateReader_LoadIntent_Call {
219	return &MockAppStateReader_LoadIntent_Call{Call: _e.mock.On("LoadIntent", ctx, app)}
220}
221
222func (_c *MockAppStateReader_LoadIntent_Call) Run(run func(ctx context.Context, app string)) *MockAppStateReader_LoadIntent_Call {
223	_c.Call.Run(func(args mock.Arguments) {
224		var arg0 context.Context
225		if args[0] != nil {
226			arg0 = args[0].(context.Context)
227		}
228		var arg1 string
229		if args[1] != nil {
230			arg1 = args[1].(string)
231		}
232		run(
233			arg0,
234			arg1,
235		)
236	})
237	return _c
238}
239
240func (_c *MockAppStateReader_LoadIntent_Call) Return(appStopIntent domain.AppStopIntent, err error) *MockAppStateReader_LoadIntent_Call {
241	_c.Call.Return(appStopIntent, err)
242	return _c
243}
244
245func (_c *MockAppStateReader_LoadIntent_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppStopIntent, error)) *MockAppStateReader_LoadIntent_Call {
246	_c.Call.Return(run)
247	return _c
248}

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