Main coves client
1// Mocks generated by Mockito 5.4.6 from annotations
2// in coves_flutter/test/providers/comments_provider_test.dart.
3// Do not manually edit this file.
4
5// ignore_for_file: no_leading_underscores_for_library_prefixes
6import 'dart:async' as _i6;
7import 'dart:ui' as _i7;
8
9import 'package:coves_flutter/models/comment.dart' as _i3;
10import 'package:coves_flutter/models/post.dart' as _i2;
11import 'package:coves_flutter/providers/auth_provider.dart' as _i5;
12import 'package:coves_flutter/providers/vote_provider.dart' as _i9;
13import 'package:coves_flutter/services/comment_service.dart' as _i4;
14import 'package:coves_flutter/services/coves_api_service.dart' as _i8;
15import 'package:mockito/mockito.dart' as _i1;
16
17// ignore_for_file: type=lint
18// ignore_for_file: avoid_redundant_argument_values
19// ignore_for_file: avoid_setters_without_getters
20// ignore_for_file: comment_references
21// ignore_for_file: deprecated_member_use
22// ignore_for_file: deprecated_member_use_from_same_package
23// ignore_for_file: implementation_imports
24// ignore_for_file: invalid_use_of_visible_for_testing_member
25// ignore_for_file: must_be_immutable
26// ignore_for_file: prefer_const_constructors
27// ignore_for_file: unnecessary_parenthesis
28// ignore_for_file: camel_case_types
29// ignore_for_file: subtype_of_sealed_class
30// ignore_for_file: invalid_use_of_internal_member
31
32class _FakeTimelineResponse_0 extends _i1.SmartFake
33 implements _i2.TimelineResponse {
34 _FakeTimelineResponse_0(Object parent, Invocation parentInvocation)
35 : super(parent, parentInvocation);
36}
37
38class _FakeCommentsResponse_1 extends _i1.SmartFake
39 implements _i3.CommentsResponse {
40 _FakeCommentsResponse_1(Object parent, Invocation parentInvocation)
41 : super(parent, parentInvocation);
42}
43
44class _FakeCreateCommentResponse_2 extends _i1.SmartFake
45 implements _i4.CreateCommentResponse {
46 _FakeCreateCommentResponse_2(Object parent, Invocation parentInvocation)
47 : super(parent, parentInvocation);
48}
49
50/// A class which mocks [AuthProvider].
51///
52/// See the documentation for Mockito's code generation for more information.
53class MockAuthProvider extends _i1.Mock implements _i5.AuthProvider {
54 MockAuthProvider() {
55 _i1.throwOnMissingStub(this);
56 }
57
58 @override
59 bool get isAuthenticated =>
60 (super.noSuchMethod(
61 Invocation.getter(#isAuthenticated),
62 returnValue: false,
63 )
64 as bool);
65
66 @override
67 bool get isLoading =>
68 (super.noSuchMethod(Invocation.getter(#isLoading), returnValue: false)
69 as bool);
70
71 @override
72 bool get hasListeners =>
73 (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
74 as bool);
75
76 @override
77 _i6.Future<String?> getAccessToken() =>
78 (super.noSuchMethod(
79 Invocation.method(#getAccessToken, []),
80 returnValue: _i6.Future<String?>.value(),
81 )
82 as _i6.Future<String?>);
83
84 @override
85 _i6.Future<void> initialize() =>
86 (super.noSuchMethod(
87 Invocation.method(#initialize, []),
88 returnValue: _i6.Future<void>.value(),
89 returnValueForMissingStub: _i6.Future<void>.value(),
90 )
91 as _i6.Future<void>);
92
93 @override
94 _i6.Future<void> signIn(String? handle) =>
95 (super.noSuchMethod(
96 Invocation.method(#signIn, [handle]),
97 returnValue: _i6.Future<void>.value(),
98 returnValueForMissingStub: _i6.Future<void>.value(),
99 )
100 as _i6.Future<void>);
101
102 @override
103 _i6.Future<void> signOut() =>
104 (super.noSuchMethod(
105 Invocation.method(#signOut, []),
106 returnValue: _i6.Future<void>.value(),
107 returnValueForMissingStub: _i6.Future<void>.value(),
108 )
109 as _i6.Future<void>);
110
111 @override
112 _i6.Future<bool> refreshToken() =>
113 (super.noSuchMethod(
114 Invocation.method(#refreshToken, []),
115 returnValue: _i6.Future<bool>.value(false),
116 )
117 as _i6.Future<bool>);
118
119 @override
120 void clearError() => super.noSuchMethod(
121 Invocation.method(#clearError, []),
122 returnValueForMissingStub: null,
123 );
124
125 @override
126 void addListener(_i7.VoidCallback? listener) => super.noSuchMethod(
127 Invocation.method(#addListener, [listener]),
128 returnValueForMissingStub: null,
129 );
130
131 @override
132 void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(
133 Invocation.method(#removeListener, [listener]),
134 returnValueForMissingStub: null,
135 );
136
137 @override
138 void dispose() => super.noSuchMethod(
139 Invocation.method(#dispose, []),
140 returnValueForMissingStub: null,
141 );
142
143 @override
144 void notifyListeners() => super.noSuchMethod(
145 Invocation.method(#notifyListeners, []),
146 returnValueForMissingStub: null,
147 );
148}
149
150/// A class which mocks [CovesApiService].
151///
152/// See the documentation for Mockito's code generation for more information.
153class MockCovesApiService extends _i1.Mock implements _i8.CovesApiService {
154 MockCovesApiService() {
155 _i1.throwOnMissingStub(this);
156 }
157
158 @override
159 _i6.Future<_i2.TimelineResponse> getTimeline({
160 String? sort = 'hot',
161 String? timeframe,
162 int? limit = 15,
163 String? cursor,
164 }) =>
165 (super.noSuchMethod(
166 Invocation.method(#getTimeline, [], {
167 #sort: sort,
168 #timeframe: timeframe,
169 #limit: limit,
170 #cursor: cursor,
171 }),
172 returnValue: _i6.Future<_i2.TimelineResponse>.value(
173 _FakeTimelineResponse_0(
174 this,
175 Invocation.method(#getTimeline, [], {
176 #sort: sort,
177 #timeframe: timeframe,
178 #limit: limit,
179 #cursor: cursor,
180 }),
181 ),
182 ),
183 )
184 as _i6.Future<_i2.TimelineResponse>);
185
186 @override
187 _i6.Future<_i2.TimelineResponse> getDiscover({
188 String? sort = 'hot',
189 String? timeframe,
190 int? limit = 15,
191 String? cursor,
192 }) =>
193 (super.noSuchMethod(
194 Invocation.method(#getDiscover, [], {
195 #sort: sort,
196 #timeframe: timeframe,
197 #limit: limit,
198 #cursor: cursor,
199 }),
200 returnValue: _i6.Future<_i2.TimelineResponse>.value(
201 _FakeTimelineResponse_0(
202 this,
203 Invocation.method(#getDiscover, [], {
204 #sort: sort,
205 #timeframe: timeframe,
206 #limit: limit,
207 #cursor: cursor,
208 }),
209 ),
210 ),
211 )
212 as _i6.Future<_i2.TimelineResponse>);
213
214 @override
215 _i6.Future<_i3.CommentsResponse> getComments({
216 required String? postUri,
217 String? sort = 'hot',
218 String? timeframe,
219 int? depth = 10,
220 int? limit = 50,
221 String? cursor,
222 }) =>
223 (super.noSuchMethod(
224 Invocation.method(#getComments, [], {
225 #postUri: postUri,
226 #sort: sort,
227 #timeframe: timeframe,
228 #depth: depth,
229 #limit: limit,
230 #cursor: cursor,
231 }),
232 returnValue: _i6.Future<_i3.CommentsResponse>.value(
233 _FakeCommentsResponse_1(
234 this,
235 Invocation.method(#getComments, [], {
236 #postUri: postUri,
237 #sort: sort,
238 #timeframe: timeframe,
239 #depth: depth,
240 #limit: limit,
241 #cursor: cursor,
242 }),
243 ),
244 ),
245 )
246 as _i6.Future<_i3.CommentsResponse>);
247
248 @override
249 void dispose() => super.noSuchMethod(
250 Invocation.method(#dispose, []),
251 returnValueForMissingStub: null,
252 );
253}
254
255/// A class which mocks [VoteProvider].
256///
257/// See the documentation for Mockito's code generation for more information.
258class MockVoteProvider extends _i1.Mock implements _i9.VoteProvider {
259 MockVoteProvider() {
260 _i1.throwOnMissingStub(this);
261 }
262
263 @override
264 bool get hasListeners =>
265 (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
266 as bool);
267
268 @override
269 void dispose() => super.noSuchMethod(
270 Invocation.method(#dispose, []),
271 returnValueForMissingStub: null,
272 );
273
274 @override
275 _i9.VoteState? getVoteState(String? postUri) =>
276 (super.noSuchMethod(Invocation.method(#getVoteState, [postUri]))
277 as _i9.VoteState?);
278
279 @override
280 bool isLiked(String? postUri) =>
281 (super.noSuchMethod(
282 Invocation.method(#isLiked, [postUri]),
283 returnValue: false,
284 )
285 as bool);
286
287 @override
288 bool isPending(String? postUri) =>
289 (super.noSuchMethod(
290 Invocation.method(#isPending, [postUri]),
291 returnValue: false,
292 )
293 as bool);
294
295 @override
296 int getAdjustedScore(String? postUri, int? serverScore) =>
297 (super.noSuchMethod(
298 Invocation.method(#getAdjustedScore, [postUri, serverScore]),
299 returnValue: 0,
300 )
301 as int);
302
303 @override
304 _i6.Future<bool> toggleVote({
305 required String? postUri,
306 required String? postCid,
307 String? direction = 'up',
308 }) =>
309 (super.noSuchMethod(
310 Invocation.method(#toggleVote, [], {
311 #postUri: postUri,
312 #postCid: postCid,
313 #direction: direction,
314 }),
315 returnValue: _i6.Future<bool>.value(false),
316 )
317 as _i6.Future<bool>);
318
319 @override
320 void setInitialVoteState({
321 required String? postUri,
322 String? voteDirection,
323 String? voteUri,
324 }) => super.noSuchMethod(
325 Invocation.method(#setInitialVoteState, [], {
326 #postUri: postUri,
327 #voteDirection: voteDirection,
328 #voteUri: voteUri,
329 }),
330 returnValueForMissingStub: null,
331 );
332
333 @override
334 void clear() => super.noSuchMethod(
335 Invocation.method(#clear, []),
336 returnValueForMissingStub: null,
337 );
338
339 @override
340 void addListener(_i7.VoidCallback? listener) => super.noSuchMethod(
341 Invocation.method(#addListener, [listener]),
342 returnValueForMissingStub: null,
343 );
344
345 @override
346 void removeListener(_i7.VoidCallback? listener) => super.noSuchMethod(
347 Invocation.method(#removeListener, [listener]),
348 returnValueForMissingStub: null,
349 );
350
351 @override
352 void notifyListeners() => super.noSuchMethod(
353 Invocation.method(#notifyListeners, []),
354 returnValueForMissingStub: null,
355 );
356}
357
358/// A class which mocks [CommentService].
359///
360/// See the documentation for Mockito's code generation for more information.
361class MockCommentService extends _i1.Mock implements _i4.CommentService {
362 MockCommentService() {
363 _i1.throwOnMissingStub(this);
364 }
365
366 @override
367 _i6.Future<_i4.CreateCommentResponse> createComment({
368 required String? rootUri,
369 required String? rootCid,
370 required String? parentUri,
371 required String? parentCid,
372 required String? content,
373 }) =>
374 (super.noSuchMethod(
375 Invocation.method(#createComment, [], {
376 #rootUri: rootUri,
377 #rootCid: rootCid,
378 #parentUri: parentUri,
379 #parentCid: parentCid,
380 #content: content,
381 }),
382 returnValue: _i6.Future<_i4.CreateCommentResponse>.value(
383 _FakeCreateCommentResponse_2(
384 this,
385 Invocation.method(#createComment, [], {
386 #rootUri: rootUri,
387 #rootCid: rootCid,
388 #parentUri: parentUri,
389 #parentCid: parentCid,
390 #content: content,
391 }),
392 ),
393 ),
394 )
395 as _i6.Future<_i4.CreateCommentResponse>);
396}