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