v3.0.0-alpha.1 6fdddb8

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

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