diff --git a/dio/pubspec.yaml b/dio/pubspec.yaml index d029333c4..504db88d3 100644 --- a/dio/pubspec.yaml +++ b/dio/pubspec.yaml @@ -25,5 +25,5 @@ dev_dependencies: test: ^1.5.1 coverage: ^1.0.3 crypto: ^3.0.2 - mockito: ^5.3.0 + mockito: ^5.2.0 build_runner: any diff --git a/dio/test/cancel_token_test.dart b/dio/test/cancel_token_test.dart index fe3c9c026..67024dd95 100644 --- a/dio/test/cancel_token_test.dart +++ b/dio/test/cancel_token_test.dart @@ -62,7 +62,7 @@ void main() { ); } - await Future.delayed(const Duration(milliseconds: 5)); + await Future.delayed(const Duration(milliseconds: 50)); token.cancel(reason); expect(requests, hasLength(2)); diff --git a/dio/test/mock/http_mock.dart b/dio/test/mock/http_mock.dart index 1de807d3d..d236f5459 100644 --- a/dio/test/mock/http_mock.dart +++ b/dio/test/mock/http_mock.dart @@ -6,12 +6,15 @@ import 'http_mock.mocks.dart'; final httpClientMock = MockHttpClient(); -@GenerateNiceMocks([ - MockSpec(), - MockSpec(), - MockSpec(), - MockSpec(), -]) +@GenerateMocks( + [], + customMocks: [ + MockSpec(), + MockSpec(), + MockSpec(), + MockSpec(), + ], +) class MockHttpOverrides extends HttpOverrides { @override HttpClient createHttpClient(SecurityContext? context) { diff --git a/dio/test/mock/http_mock.mocks.dart b/dio/test/mock/http_mock.mocks.dart index 9ea0d1714..baa6a5fd6 100644 --- a/dio/test/mock/http_mock.mocks.dart +++ b/dio/test/mock/http_mock.mocks.dart @@ -1,8 +1,7 @@ -// Mocks generated by Mockito 5.4.0 from annotations +// Mocks generated by Mockito 5.2.0 from annotations // in dio/test/mock/http_mock.dart. // Do not manually edit this file. -// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i4; import 'dart:convert' as _i3; import 'dart:io' as _i2; @@ -18,1004 +17,309 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class -class _FakeDuration_0 extends _i1.SmartFake implements Duration { - _FakeDuration_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} +class _FakeDuration_0 extends _i1.Fake implements Duration {} -class _FakeHttpClientRequest_1 extends _i1.SmartFake - implements _i2.HttpClientRequest { - _FakeHttpClientRequest_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} +class _FakeHttpClientRequest_1 extends _i1.Fake + implements _i2.HttpClientRequest {} -class _FakeUri_2 extends _i1.SmartFake implements Uri { - _FakeUri_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} +class _FakeUri_2 extends _i1.Fake implements Uri {} -class _FakeHttpHeaders_3 extends _i1.SmartFake implements _i2.HttpHeaders { - _FakeHttpHeaders_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} +class _FakeHttpHeaders_3 extends _i1.Fake implements _i2.HttpHeaders {} -class _FakeHttpClientResponse_4 extends _i1.SmartFake - implements _i2.HttpClientResponse { - _FakeHttpClientResponse_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} +class _FakeHttpClientResponse_4 extends _i1.Fake + implements _i2.HttpClientResponse {} -class _FakeEncoding_5 extends _i1.SmartFake implements _i3.Encoding { - _FakeEncoding_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} +class _FakeEncoding_5 extends _i1.Fake implements _i3.Encoding {} -class _FakeSocket_6 extends _i1.SmartFake implements _i2.Socket { - _FakeSocket_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} +class _FakeSocket_6 extends _i1.Fake implements _i2.Socket {} -class _FakeStreamSubscription_7 extends _i1.SmartFake - implements _i4.StreamSubscription { - _FakeStreamSubscription_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFuture_8 extends _i1.SmartFake implements _i4.Future { - _FakeFuture_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} +class _FakeStreamSubscription_7 extends _i1.Fake + implements _i4.StreamSubscription {} /// A class which mocks [HttpClient]. /// /// See the documentation for Mockito's code generation for more information. class MockHttpClient extends _i1.Mock implements _i2.HttpClient { + MockHttpClient() { + _i1.throwOnMissingStub(this); + } + + @override + Duration get idleTimeout => + (super.noSuchMethod(Invocation.getter(#idleTimeout), + returnValue: _FakeDuration_0()) as Duration); @override - Duration get idleTimeout => (super.noSuchMethod( - Invocation.getter(#idleTimeout), - returnValue: _FakeDuration_0( - this, - Invocation.getter(#idleTimeout), - ), - returnValueForMissingStub: _FakeDuration_0( - this, - Invocation.getter(#idleTimeout), - ), - ) as Duration); - @override - set idleTimeout(Duration? _idleTimeout) => super.noSuchMethod( - Invocation.setter( - #idleTimeout, - _idleTimeout, - ), - returnValueForMissingStub: null, - ); + set idleTimeout(Duration? _idleTimeout) => + super.noSuchMethod(Invocation.setter(#idleTimeout, _idleTimeout), + returnValueForMissingStub: null); @override set connectionTimeout(Duration? _connectionTimeout) => super.noSuchMethod( - Invocation.setter( - #connectionTimeout, - _connectionTimeout, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#connectionTimeout, _connectionTimeout), + returnValueForMissingStub: null); @override set maxConnectionsPerHost(int? _maxConnectionsPerHost) => super.noSuchMethod( - Invocation.setter( - #maxConnectionsPerHost, - _maxConnectionsPerHost, - ), - returnValueForMissingStub: null, - ); - @override - bool get autoUncompress => (super.noSuchMethod( - Invocation.getter(#autoUncompress), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - @override - set autoUncompress(bool? _autoUncompress) => super.noSuchMethod( - Invocation.setter( - #autoUncompress, - _autoUncompress, - ), - returnValueForMissingStub: null, - ); - @override - set userAgent(String? _userAgent) => super.noSuchMethod( - Invocation.setter( - #userAgent, - _userAgent, - ), - returnValueForMissingStub: null, - ); - @override - set authenticate( - _i4.Future Function( - Uri, - String, - String?, - )? f) => - super.noSuchMethod( - Invocation.setter( - #authenticate, - f, - ), - returnValueForMissingStub: null, - ); - @override - set connectionFactory( - _i4.Future<_i2.ConnectionTask<_i2.Socket>> Function( - Uri, - String?, - int?, - )? f) => - super.noSuchMethod( - Invocation.setter( - #connectionFactory, - f, - ), - returnValueForMissingStub: null, - ); - @override - set findProxy(String Function(Uri)? f) => super.noSuchMethod( - Invocation.setter( - #findProxy, - f, - ), - returnValueForMissingStub: null, - ); + Invocation.setter(#maxConnectionsPerHost, _maxConnectionsPerHost), + returnValueForMissingStub: null); + @override + bool get autoUncompress => (super + .noSuchMethod(Invocation.getter(#autoUncompress), returnValue: false) + as bool); + @override + set autoUncompress(bool? _autoUncompress) => + super.noSuchMethod(Invocation.setter(#autoUncompress, _autoUncompress), + returnValueForMissingStub: null); + @override + set userAgent(String? _userAgent) => + super.noSuchMethod(Invocation.setter(#userAgent, _userAgent), + returnValueForMissingStub: null); + @override + set authenticate(_i4.Future Function(Uri, String, String?)? f) => + super.noSuchMethod(Invocation.setter(#authenticate, f), + returnValueForMissingStub: null); + @override + set findProxy(String Function(Uri)? f) => + super.noSuchMethod(Invocation.setter(#findProxy, f), + returnValueForMissingStub: null); @override set authenticateProxy( - _i4.Future Function( - String, - int, - String, - String?, - )? f) => - super.noSuchMethod( - Invocation.setter( - #authenticateProxy, - f, - ), - returnValueForMissingStub: null, - ); + _i4.Future Function(String, int, String, String?)? f) => + super.noSuchMethod(Invocation.setter(#authenticateProxy, f), + returnValueForMissingStub: null); @override set badCertificateCallback( - bool Function( - _i2.X509Certificate, - String, - int, - )? callback) => - super.noSuchMethod( - Invocation.setter( - #badCertificateCallback, - callback, - ), - returnValueForMissingStub: null, - ); - @override - set keyLog(dynamic Function(String)? callback) => super.noSuchMethod( - Invocation.setter( - #keyLog, - callback, - ), - returnValueForMissingStub: null, - ); + bool Function(_i2.X509Certificate, String, int)? callback) => + super.noSuchMethod(Invocation.setter(#badCertificateCallback, callback), + returnValueForMissingStub: null); @override _i4.Future<_i2.HttpClientRequest> open( - String? method, - String? host, - int? port, - String? path, - ) => - (super.noSuchMethod( - Invocation.method( - #open, - [ - method, - host, - port, - path, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #open, - [ - method, - host, - port, - path, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #open, - [ - method, - host, - port, - path, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); - @override - _i4.Future<_i2.HttpClientRequest> openUrl( - String? method, - Uri? url, - ) => - (super.noSuchMethod( - Invocation.method( - #openUrl, - [ - method, - url, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #openUrl, - [ - method, - url, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #openUrl, - [ - method, - url, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + String? method, String? host, int? port, String? path) => + (super.noSuchMethod(Invocation.method(#open, [method, host, port, path]), + returnValue: Future<_i2.HttpClientRequest>.value( + _FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); + @override + _i4.Future<_i2.HttpClientRequest> openUrl(String? method, Uri? url) => + (super.noSuchMethod(Invocation.method(#openUrl, [method, url]), + returnValue: Future<_i2.HttpClientRequest>.value( + _FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> get( - String? host, - int? port, - String? path, - ) => - (super.noSuchMethod( - Invocation.method( - #get, - [ - host, - port, - path, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #get, - [ - host, - port, - path, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #get, - [ - host, - port, - path, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + String? host, int? port, String? path) => + (super.noSuchMethod(Invocation.method(#get, [host, port, path]), + returnValue: Future<_i2.HttpClientRequest>.value( + _FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> getUrl(Uri? url) => (super.noSuchMethod( - Invocation.method( - #getUrl, - [url], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #getUrl, - [url], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #getUrl, - [url], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + Invocation.method(#getUrl, [url]), + returnValue: + Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> post( - String? host, - int? port, - String? path, - ) => - (super.noSuchMethod( - Invocation.method( - #post, - [ - host, - port, - path, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #post, - [ - host, - port, - path, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #post, - [ - host, - port, - path, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + String? host, int? port, String? path) => + (super.noSuchMethod(Invocation.method(#post, [host, port, path]), + returnValue: Future<_i2.HttpClientRequest>.value( + _FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> postUrl(Uri? url) => (super.noSuchMethod( - Invocation.method( - #postUrl, - [url], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #postUrl, - [url], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #postUrl, - [url], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + Invocation.method(#postUrl, [url]), + returnValue: + Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> put( - String? host, - int? port, - String? path, - ) => - (super.noSuchMethod( - Invocation.method( - #put, - [ - host, - port, - path, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #put, - [ - host, - port, - path, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #put, - [ - host, - port, - path, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + String? host, int? port, String? path) => + (super.noSuchMethod(Invocation.method(#put, [host, port, path]), + returnValue: Future<_i2.HttpClientRequest>.value( + _FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> putUrl(Uri? url) => (super.noSuchMethod( - Invocation.method( - #putUrl, - [url], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #putUrl, - [url], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #putUrl, - [url], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + Invocation.method(#putUrl, [url]), + returnValue: + Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> delete( - String? host, - int? port, - String? path, - ) => - (super.noSuchMethod( - Invocation.method( - #delete, - [ - host, - port, - path, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #delete, - [ - host, - port, - path, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #delete, - [ - host, - port, - path, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + String? host, int? port, String? path) => + (super.noSuchMethod(Invocation.method(#delete, [host, port, path]), + returnValue: Future<_i2.HttpClientRequest>.value( + _FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> deleteUrl(Uri? url) => (super.noSuchMethod( - Invocation.method( - #deleteUrl, - [url], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #deleteUrl, - [url], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #deleteUrl, - [url], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + Invocation.method(#deleteUrl, [url]), + returnValue: + Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> patch( - String? host, - int? port, - String? path, - ) => - (super.noSuchMethod( - Invocation.method( - #patch, - [ - host, - port, - path, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #patch, - [ - host, - port, - path, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #patch, - [ - host, - port, - path, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + String? host, int? port, String? path) => + (super.noSuchMethod(Invocation.method(#patch, [host, port, path]), + returnValue: Future<_i2.HttpClientRequest>.value( + _FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> patchUrl(Uri? url) => (super.noSuchMethod( - Invocation.method( - #patchUrl, - [url], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #patchUrl, - [url], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #patchUrl, - [url], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + Invocation.method(#patchUrl, [url]), + returnValue: + Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> head( - String? host, - int? port, - String? path, - ) => - (super.noSuchMethod( - Invocation.method( - #head, - [ - host, - port, - path, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #head, - [ - host, - port, - path, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #head, - [ - host, - port, - path, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + String? host, int? port, String? path) => + (super.noSuchMethod(Invocation.method(#head, [host, port, path]), + returnValue: Future<_i2.HttpClientRequest>.value( + _FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override _i4.Future<_i2.HttpClientRequest> headUrl(Uri? url) => (super.noSuchMethod( - Invocation.method( - #headUrl, - [url], - ), - returnValue: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #headUrl, - [url], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1( - this, - Invocation.method( - #headUrl, - [url], - ), - )), - ) as _i4.Future<_i2.HttpClientRequest>); + Invocation.method(#headUrl, [url]), + returnValue: + Future<_i2.HttpClientRequest>.value(_FakeHttpClientRequest_1())) + as _i4.Future<_i2.HttpClientRequest>); @override void addCredentials( - Uri? url, - String? realm, - _i2.HttpClientCredentials? credentials, - ) => + Uri? url, String? realm, _i2.HttpClientCredentials? credentials) => super.noSuchMethod( - Invocation.method( - #addCredentials, - [ - url, - realm, - credentials, - ], - ), - returnValueForMissingStub: null, - ); - @override - void addProxyCredentials( - String? host, - int? port, - String? realm, - _i2.HttpClientCredentials? credentials, - ) => + Invocation.method(#addCredentials, [url, realm, credentials]), + returnValueForMissingStub: null); + @override + void addProxyCredentials(String? host, int? port, String? realm, + _i2.HttpClientCredentials? credentials) => super.noSuchMethod( - Invocation.method( - #addProxyCredentials, - [ - host, - port, - realm, - credentials, - ], - ), - returnValueForMissingStub: null, - ); - @override - void close({bool? force = false}) => super.noSuchMethod( - Invocation.method( - #close, - [], - {#force: force}, - ), - returnValueForMissingStub: null, - ); + Invocation.method( + #addProxyCredentials, [host, port, realm, credentials]), + returnValueForMissingStub: null); + @override + void close({bool? force = false}) => + super.noSuchMethod(Invocation.method(#close, [], {#force: force}), + returnValueForMissingStub: null); } /// A class which mocks [HttpClientRequest]. /// /// See the documentation for Mockito's code generation for more information. class MockHttpClientRequest extends _i1.Mock implements _i2.HttpClientRequest { + MockHttpClientRequest() { + _i1.throwOnMissingStub(this); + } + @override - bool get persistentConnection => (super.noSuchMethod( - Invocation.getter(#persistentConnection), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); + bool get persistentConnection => + (super.noSuchMethod(Invocation.getter(#persistentConnection), + returnValue: false) as bool); @override set persistentConnection(bool? _persistentConnection) => super.noSuchMethod( - Invocation.setter( - #persistentConnection, - _persistentConnection, - ), - returnValueForMissingStub: null, - ); - @override - bool get followRedirects => (super.noSuchMethod( - Invocation.getter(#followRedirects), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - @override - set followRedirects(bool? _followRedirects) => super.noSuchMethod( - Invocation.setter( - #followRedirects, - _followRedirects, - ), - returnValueForMissingStub: null, - ); - @override - int get maxRedirects => (super.noSuchMethod( - Invocation.getter(#maxRedirects), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); - @override - set maxRedirects(int? _maxRedirects) => super.noSuchMethod( - Invocation.setter( - #maxRedirects, - _maxRedirects, - ), - returnValueForMissingStub: null, - ); - @override - int get contentLength => (super.noSuchMethod( - Invocation.getter(#contentLength), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); - @override - set contentLength(int? _contentLength) => super.noSuchMethod( - Invocation.setter( - #contentLength, - _contentLength, - ), - returnValueForMissingStub: null, - ); - @override - bool get bufferOutput => (super.noSuchMethod( - Invocation.getter(#bufferOutput), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - @override - set bufferOutput(bool? _bufferOutput) => super.noSuchMethod( - Invocation.setter( - #bufferOutput, - _bufferOutput, - ), - returnValueForMissingStub: null, - ); - @override - String get method => (super.noSuchMethod( - Invocation.getter(#method), - returnValue: '', - returnValueForMissingStub: '', - ) as String); - @override - Uri get uri => (super.noSuchMethod( - Invocation.getter(#uri), - returnValue: _FakeUri_2( - this, - Invocation.getter(#uri), - ), - returnValueForMissingStub: _FakeUri_2( - this, - Invocation.getter(#uri), - ), - ) as Uri); - @override - _i2.HttpHeaders get headers => (super.noSuchMethod( - Invocation.getter(#headers), - returnValue: _FakeHttpHeaders_3( - this, - Invocation.getter(#headers), - ), - returnValueForMissingStub: _FakeHttpHeaders_3( - this, - Invocation.getter(#headers), - ), - ) as _i2.HttpHeaders); - @override - List<_i2.Cookie> get cookies => (super.noSuchMethod( - Invocation.getter(#cookies), - returnValue: <_i2.Cookie>[], - returnValueForMissingStub: <_i2.Cookie>[], - ) as List<_i2.Cookie>); + Invocation.setter(#persistentConnection, _persistentConnection), + returnValueForMissingStub: null); + @override + bool get followRedirects => (super + .noSuchMethod(Invocation.getter(#followRedirects), returnValue: false) + as bool); + @override + set followRedirects(bool? _followRedirects) => + super.noSuchMethod(Invocation.setter(#followRedirects, _followRedirects), + returnValueForMissingStub: null); + @override + int get maxRedirects => + (super.noSuchMethod(Invocation.getter(#maxRedirects), returnValue: 0) + as int); + @override + set maxRedirects(int? _maxRedirects) => + super.noSuchMethod(Invocation.setter(#maxRedirects, _maxRedirects), + returnValueForMissingStub: null); + @override + int get contentLength => + (super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0) + as int); + @override + set contentLength(int? _contentLength) => + super.noSuchMethod(Invocation.setter(#contentLength, _contentLength), + returnValueForMissingStub: null); + @override + bool get bufferOutput => + (super.noSuchMethod(Invocation.getter(#bufferOutput), returnValue: false) + as bool); + @override + set bufferOutput(bool? _bufferOutput) => + super.noSuchMethod(Invocation.setter(#bufferOutput, _bufferOutput), + returnValueForMissingStub: null); + @override + String get method => + (super.noSuchMethod(Invocation.getter(#method), returnValue: '') + as String); + @override + Uri get uri => + (super.noSuchMethod(Invocation.getter(#uri), returnValue: _FakeUri_2()) + as Uri); + @override + _i2.HttpHeaders get headers => + (super.noSuchMethod(Invocation.getter(#headers), + returnValue: _FakeHttpHeaders_3()) as _i2.HttpHeaders); + @override + List<_i2.Cookie> get cookies => + (super.noSuchMethod(Invocation.getter(#cookies), + returnValue: <_i2.Cookie>[]) as List<_i2.Cookie>); @override _i4.Future<_i2.HttpClientResponse> get done => (super.noSuchMethod( - Invocation.getter(#done), - returnValue: - _i4.Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4( - this, - Invocation.getter(#done), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4( - this, Invocation.getter(#done), - )), - ) as _i4.Future<_i2.HttpClientResponse>); - @override - _i3.Encoding get encoding => (super.noSuchMethod( - Invocation.getter(#encoding), - returnValue: _FakeEncoding_5( - this, - Invocation.getter(#encoding), - ), - returnValueForMissingStub: _FakeEncoding_5( - this, - Invocation.getter(#encoding), - ), - ) as _i3.Encoding); - @override - set encoding(_i3.Encoding? _encoding) => super.noSuchMethod( - Invocation.setter( - #encoding, - _encoding, - ), - returnValueForMissingStub: null, - ); + returnValue: + Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4())) + as _i4.Future<_i2.HttpClientResponse>); + @override + _i3.Encoding get encoding => (super.noSuchMethod(Invocation.getter(#encoding), + returnValue: _FakeEncoding_5()) as _i3.Encoding); + @override + set encoding(_i3.Encoding? _encoding) => + super.noSuchMethod(Invocation.setter(#encoding, _encoding), + returnValueForMissingStub: null); @override _i4.Future<_i2.HttpClientResponse> close() => (super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValue: - _i4.Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4( - this, - Invocation.method( - #close, - [], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4( - this, - Invocation.method( - #close, - [], - ), - )), - ) as _i4.Future<_i2.HttpClientResponse>); - @override - void abort([ - Object? exception, - StackTrace? stackTrace, - ]) => - super.noSuchMethod( - Invocation.method( - #abort, - [ - exception, - stackTrace, - ], - ), - returnValueForMissingStub: null, - ); - @override - void add(List? data) => super.noSuchMethod( - Invocation.method( - #add, - [data], - ), - returnValueForMissingStub: null, - ); - @override - void write(Object? object) => super.noSuchMethod( - Invocation.method( - #write, - [object], - ), - returnValueForMissingStub: null, - ); - @override - void writeAll( - Iterable? objects, [ - String? separator = r'', - ]) => - super.noSuchMethod( - Invocation.method( - #writeAll, - [ - objects, - separator, - ], - ), - returnValueForMissingStub: null, - ); - @override - void writeln([Object? object = r'']) => super.noSuchMethod( - Invocation.method( - #writeln, - [object], - ), - returnValueForMissingStub: null, - ); - @override - void writeCharCode(int? charCode) => super.noSuchMethod( - Invocation.method( - #writeCharCode, - [charCode], - ), - returnValueForMissingStub: null, - ); - @override - void addError( - Object? error, [ - StackTrace? stackTrace, - ]) => - super.noSuchMethod( - Invocation.method( - #addError, - [ - error, - stackTrace, - ], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#close, []), + returnValue: + Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4())) + as _i4.Future<_i2.HttpClientResponse>); + @override + void abort([Object? exception, StackTrace? stackTrace]) => + super.noSuchMethod(Invocation.method(#abort, [exception, stackTrace]), + returnValueForMissingStub: null); + @override + void add(List? data) => + super.noSuchMethod(Invocation.method(#add, [data]), + returnValueForMissingStub: null); + @override + void write(Object? object) => + super.noSuchMethod(Invocation.method(#write, [object]), + returnValueForMissingStub: null); + @override + void writeAll(Iterable? objects, [String? separator = r'']) => + super.noSuchMethod(Invocation.method(#writeAll, [objects, separator]), + returnValueForMissingStub: null); + @override + void writeln([Object? object = r'']) => + super.noSuchMethod(Invocation.method(#writeln, [object]), + returnValueForMissingStub: null); + @override + void writeCharCode(int? charCode) => + super.noSuchMethod(Invocation.method(#writeCharCode, [charCode]), + returnValueForMissingStub: null); + @override + void addError(Object? error, [StackTrace? stackTrace]) => + super.noSuchMethod(Invocation.method(#addError, [error, stackTrace]), + returnValueForMissingStub: null); @override _i4.Future addStream(_i4.Stream>? stream) => - (super.noSuchMethod( - Invocation.method( - #addStream, - [stream], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); - @override - _i4.Future flush() => (super.noSuchMethod( - Invocation.method( - #flush, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + (super.noSuchMethod(Invocation.method(#addStream, [stream]), + returnValue: Future.value()) as _i4.Future); + @override + _i4.Future flush() => + (super.noSuchMethod(Invocation.method(#flush, []), + returnValue: Future.value()) as _i4.Future); } /// A class which mocks [HttpClientResponse]. @@ -1023,769 +327,330 @@ class MockHttpClientRequest extends _i1.Mock implements _i2.HttpClientRequest { /// See the documentation for Mockito's code generation for more information. class MockHttpClientResponse extends _i1.Mock implements _i2.HttpClientResponse { + MockHttpClientResponse() { + _i1.throwOnMissingStub(this); + } + @override - int get statusCode => (super.noSuchMethod( - Invocation.getter(#statusCode), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); + int get statusCode => + (super.noSuchMethod(Invocation.getter(#statusCode), returnValue: 0) + as int); @override - String get reasonPhrase => (super.noSuchMethod( - Invocation.getter(#reasonPhrase), - returnValue: '', - returnValueForMissingStub: '', - ) as String); + String get reasonPhrase => + (super.noSuchMethod(Invocation.getter(#reasonPhrase), returnValue: '') + as String); @override - int get contentLength => (super.noSuchMethod( - Invocation.getter(#contentLength), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); + int get contentLength => + (super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0) + as int); @override _i2.HttpClientResponseCompressionState get compressionState => - (super.noSuchMethod( - Invocation.getter(#compressionState), - returnValue: _i2.HttpClientResponseCompressionState.notCompressed, - returnValueForMissingStub: - _i2.HttpClientResponseCompressionState.notCompressed, - ) as _i2.HttpClientResponseCompressionState); - @override - bool get persistentConnection => (super.noSuchMethod( - Invocation.getter(#persistentConnection), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - @override - bool get isRedirect => (super.noSuchMethod( - Invocation.getter(#isRedirect), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - @override - List<_i2.RedirectInfo> get redirects => (super.noSuchMethod( - Invocation.getter(#redirects), - returnValue: <_i2.RedirectInfo>[], - returnValueForMissingStub: <_i2.RedirectInfo>[], - ) as List<_i2.RedirectInfo>); - @override - _i2.HttpHeaders get headers => (super.noSuchMethod( - Invocation.getter(#headers), - returnValue: _FakeHttpHeaders_3( - this, - Invocation.getter(#headers), - ), - returnValueForMissingStub: _FakeHttpHeaders_3( - this, - Invocation.getter(#headers), - ), - ) as _i2.HttpHeaders); - @override - List<_i2.Cookie> get cookies => (super.noSuchMethod( - Invocation.getter(#cookies), - returnValue: <_i2.Cookie>[], - returnValueForMissingStub: <_i2.Cookie>[], - ) as List<_i2.Cookie>); - @override - bool get isBroadcast => (super.noSuchMethod( - Invocation.getter(#isBroadcast), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); - @override - _i4.Future get length => (super.noSuchMethod( - Invocation.getter(#length), - returnValue: _i4.Future.value(0), - returnValueForMissingStub: _i4.Future.value(0), - ) as _i4.Future); - @override - _i4.Future get isEmpty => (super.noSuchMethod( - Invocation.getter(#isEmpty), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); + (super.noSuchMethod(Invocation.getter(#compressionState), + returnValue: _i2.HttpClientResponseCompressionState.notCompressed) + as _i2.HttpClientResponseCompressionState); + @override + bool get persistentConnection => + (super.noSuchMethod(Invocation.getter(#persistentConnection), + returnValue: false) as bool); + @override + bool get isRedirect => + (super.noSuchMethod(Invocation.getter(#isRedirect), returnValue: false) + as bool); + @override + List<_i2.RedirectInfo> get redirects => + (super.noSuchMethod(Invocation.getter(#redirects), + returnValue: <_i2.RedirectInfo>[]) as List<_i2.RedirectInfo>); + @override + _i2.HttpHeaders get headers => + (super.noSuchMethod(Invocation.getter(#headers), + returnValue: _FakeHttpHeaders_3()) as _i2.HttpHeaders); + @override + List<_i2.Cookie> get cookies => + (super.noSuchMethod(Invocation.getter(#cookies), + returnValue: <_i2.Cookie>[]) as List<_i2.Cookie>); + @override + bool get isBroadcast => + (super.noSuchMethod(Invocation.getter(#isBroadcast), returnValue: false) + as bool); + @override + _i4.Future get length => (super.noSuchMethod(Invocation.getter(#length), + returnValue: Future.value(0)) as _i4.Future); + @override + _i4.Future get isEmpty => + (super.noSuchMethod(Invocation.getter(#isEmpty), + returnValue: Future.value(false)) as _i4.Future); @override _i4.Future> get first => (super.noSuchMethod( - Invocation.getter(#first), - returnValue: _i4.Future>.value([]), - returnValueForMissingStub: _i4.Future>.value([]), - ) as _i4.Future>); + Invocation.getter(#first), + returnValue: Future>.value([])) as _i4.Future>); @override _i4.Future> get last => (super.noSuchMethod( - Invocation.getter(#last), - returnValue: _i4.Future>.value([]), - returnValueForMissingStub: _i4.Future>.value([]), - ) as _i4.Future>); + Invocation.getter(#last), + returnValue: Future>.value([])) as _i4.Future>); @override _i4.Future> get single => (super.noSuchMethod( - Invocation.getter(#single), - returnValue: _i4.Future>.value([]), - returnValueForMissingStub: _i4.Future>.value([]), - ) as _i4.Future>); - @override - _i4.Future<_i2.HttpClientResponse> redirect([ - String? method, - Uri? url, - bool? followLoops, - ]) => + Invocation.getter(#single), + returnValue: Future>.value([])) as _i4.Future>); + @override + _i4.Future<_i2.HttpClientResponse> redirect( + [String? method, Uri? url, bool? followLoops]) => (super.noSuchMethod( - Invocation.method( - #redirect, - [ - method, - url, - followLoops, - ], - ), - returnValue: - _i4.Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4( - this, - Invocation.method( - #redirect, - [ - method, - url, - followLoops, - ], - ), - )), - returnValueForMissingStub: - _i4.Future<_i2.HttpClientResponse>.value(_FakeHttpClientResponse_4( - this, - Invocation.method( - #redirect, - [ - method, - url, - followLoops, - ], - ), - )), - ) as _i4.Future<_i2.HttpClientResponse>); - @override - _i4.Future<_i2.Socket> detachSocket() => (super.noSuchMethod( - Invocation.method( - #detachSocket, - [], - ), - returnValue: _i4.Future<_i2.Socket>.value(_FakeSocket_6( - this, - Invocation.method( - #detachSocket, - [], - ), - )), - returnValueForMissingStub: _i4.Future<_i2.Socket>.value(_FakeSocket_6( - this, - Invocation.method( - #detachSocket, - [], - ), - )), - ) as _i4.Future<_i2.Socket>); - @override - _i4.Stream> asBroadcastStream({ - void Function(_i4.StreamSubscription>)? onListen, - void Function(_i4.StreamSubscription>)? onCancel, - }) => + Invocation.method(#redirect, [method, url, followLoops]), + returnValue: Future<_i2.HttpClientResponse>.value( + _FakeHttpClientResponse_4())) + as _i4.Future<_i2.HttpClientResponse>); + @override + _i4.Future<_i2.Socket> detachSocket() => + (super.noSuchMethod(Invocation.method(#detachSocket, []), + returnValue: Future<_i2.Socket>.value(_FakeSocket_6())) + as _i4.Future<_i2.Socket>); + @override + _i4.Stream> asBroadcastStream( + {void Function(_i4.StreamSubscription>)? onListen, + void Function(_i4.StreamSubscription>)? onCancel}) => (super.noSuchMethod( - Invocation.method( - #asBroadcastStream, - [], - { - #onListen: onListen, - #onCancel: onCancel, - }, - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); - @override - _i4.StreamSubscription> listen( - void Function(List)? onData, { - Function? onError, - void Function()? onDone, - bool? cancelOnError, - }) => + Invocation.method(#asBroadcastStream, [], + {#onListen: onListen, #onCancel: onCancel}), + returnValue: Stream>.empty()) as _i4.Stream>); + @override + _i4.StreamSubscription> listen(void Function(List)? onData, + {Function? onError, void Function()? onDone, bool? cancelOnError}) => (super.noSuchMethod( - Invocation.method( - #listen, - [onData], - { - #onError: onError, - #onDone: onDone, - #cancelOnError: cancelOnError, - }, - ), - returnValue: _FakeStreamSubscription_7>( - this, - Invocation.method( - #listen, - [onData], - { - #onError: onError, - #onDone: onDone, - #cancelOnError: cancelOnError, - }, - ), - ), - returnValueForMissingStub: _FakeStreamSubscription_7>( - this, - Invocation.method( - #listen, - [onData], - { - #onError: onError, - #onDone: onDone, - #cancelOnError: cancelOnError, - }, - ), - ), - ) as _i4.StreamSubscription>); + Invocation.method(#listen, [ + onData + ], { + #onError: onError, + #onDone: onDone, + #cancelOnError: cancelOnError + }), + returnValue: _FakeStreamSubscription_7>()) + as _i4.StreamSubscription>); @override _i4.Stream> where(bool Function(List)? test) => - (super.noSuchMethod( - Invocation.method( - #where, - [test], - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); - @override - _i4.Stream map(S Function(List)? convert) => (super.noSuchMethod( - Invocation.method( - #map, - [convert], - ), - returnValue: _i4.Stream.empty(), - returnValueForMissingStub: _i4.Stream.empty(), - ) as _i4.Stream); + (super.noSuchMethod(Invocation.method(#where, [test]), + returnValue: Stream>.empty()) as _i4.Stream>); + @override + _i4.Stream map(S Function(List)? convert) => + (super.noSuchMethod(Invocation.method(#map, [convert]), + returnValue: Stream.empty()) as _i4.Stream); @override _i4.Stream asyncMap(_i4.FutureOr Function(List)? convert) => - (super.noSuchMethod( - Invocation.method( - #asyncMap, - [convert], - ), - returnValue: _i4.Stream.empty(), - returnValueForMissingStub: _i4.Stream.empty(), - ) as _i4.Stream); + (super.noSuchMethod(Invocation.method(#asyncMap, [convert]), + returnValue: Stream.empty()) as _i4.Stream); @override _i4.Stream asyncExpand(_i4.Stream? Function(List)? convert) => + (super.noSuchMethod(Invocation.method(#asyncExpand, [convert]), + returnValue: Stream.empty()) as _i4.Stream); + @override + _i4.Stream> handleError(Function? onError, + {bool Function(dynamic)? test}) => (super.noSuchMethod( - Invocation.method( - #asyncExpand, - [convert], - ), - returnValue: _i4.Stream.empty(), - returnValueForMissingStub: _i4.Stream.empty(), - ) as _i4.Stream); - @override - _i4.Stream> handleError( - Function? onError, { - bool Function(dynamic)? test, - }) => - (super.noSuchMethod( - Invocation.method( - #handleError, - [onError], - {#test: test}, - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); + Invocation.method(#handleError, [onError], {#test: test}), + returnValue: Stream>.empty()) as _i4.Stream>); @override _i4.Stream expand(Iterable Function(List)? convert) => - (super.noSuchMethod( - Invocation.method( - #expand, - [convert], - ), - returnValue: _i4.Stream.empty(), - returnValueForMissingStub: _i4.Stream.empty(), - ) as _i4.Stream); + (super.noSuchMethod(Invocation.method(#expand, [convert]), + returnValue: Stream.empty()) as _i4.Stream); @override _i4.Future pipe(_i4.StreamConsumer>? streamConsumer) => - (super.noSuchMethod( - Invocation.method( - #pipe, - [streamConsumer], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + (super.noSuchMethod(Invocation.method(#pipe, [streamConsumer]), + returnValue: Future.value()) as _i4.Future); @override _i4.Stream transform( _i4.StreamTransformer, S>? streamTransformer) => - (super.noSuchMethod( - Invocation.method( - #transform, - [streamTransformer], - ), - returnValue: _i4.Stream.empty(), - returnValueForMissingStub: _i4.Stream.empty(), - ) as _i4.Stream); + (super.noSuchMethod(Invocation.method(#transform, [streamTransformer]), + returnValue: Stream.empty()) as _i4.Stream); @override _i4.Future> reduce( - List Function( - List, - List, - )? combine) => - (super.noSuchMethod( - Invocation.method( - #reduce, - [combine], - ), - returnValue: _i4.Future>.value([]), - returnValueForMissingStub: _i4.Future>.value([]), - ) as _i4.Future>); - @override - _i4.Future fold( - S? initialValue, - S Function( - S, - List, - )? combine, - ) => - (super.noSuchMethod( - Invocation.method( - #fold, - [ - initialValue, - combine, - ], - ), - returnValue: _FakeFuture_8( - this, - Invocation.method( - #fold, - [ - initialValue, - combine, - ], - ), - ), - returnValueForMissingStub: _FakeFuture_8( - this, - Invocation.method( - #fold, - [ - initialValue, - combine, - ], - ), - ), - ) as _i4.Future); - @override - _i4.Future join([String? separator = r'']) => (super.noSuchMethod( - Invocation.method( - #join, - [separator], - ), - returnValue: _i4.Future.value(''), - returnValueForMissingStub: _i4.Future.value(''), - ) as _i4.Future); - @override - _i4.Future contains(Object? needle) => (super.noSuchMethod( - Invocation.method( - #contains, - [needle], - ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); - @override - _i4.Future forEach(void Function(List)? action) => - (super.noSuchMethod( - Invocation.method( - #forEach, - [action], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); - @override - _i4.Future every(bool Function(List)? test) => (super.noSuchMethod( - Invocation.method( - #every, - [test], - ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); - @override - _i4.Future any(bool Function(List)? test) => (super.noSuchMethod( - Invocation.method( - #any, - [test], - ), - returnValue: _i4.Future.value(false), - returnValueForMissingStub: _i4.Future.value(false), - ) as _i4.Future); - @override - _i4.Stream cast() => (super.noSuchMethod( - Invocation.method( - #cast, - [], - ), - returnValue: _i4.Stream.empty(), - returnValueForMissingStub: _i4.Stream.empty(), - ) as _i4.Stream); - @override - _i4.Future>> toList() => (super.noSuchMethod( - Invocation.method( - #toList, - [], - ), - returnValue: _i4.Future>>.value(>[]), - returnValueForMissingStub: - _i4.Future>>.value(>[]), - ) as _i4.Future>>); - @override - _i4.Future>> toSet() => (super.noSuchMethod( - Invocation.method( - #toSet, - [], - ), - returnValue: _i4.Future>>.value(>{}), - returnValueForMissingStub: - _i4.Future>>.value(>{}), - ) as _i4.Future>>); - @override - _i4.Future drain([E? futureValue]) => (super.noSuchMethod( - Invocation.method( - #drain, - [futureValue], - ), - returnValue: _FakeFuture_8( - this, - Invocation.method( - #drain, - [futureValue], - ), - ), - returnValueForMissingStub: _FakeFuture_8( - this, - Invocation.method( - #drain, - [futureValue], - ), - ), - ) as _i4.Future); - @override - _i4.Stream> take(int? count) => (super.noSuchMethod( - Invocation.method( - #take, - [count], - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); + List Function(List, List)? combine) => + (super.noSuchMethod(Invocation.method(#reduce, [combine]), + returnValue: Future>.value([])) + as _i4.Future>); + @override + _i4.Future fold(S? initialValue, S Function(S, List)? combine) => + (super.noSuchMethod(Invocation.method(#fold, [initialValue, combine]), + returnValue: Future.value(null)) as _i4.Future); + @override + _i4.Future join([String? separator = r'']) => + (super.noSuchMethod(Invocation.method(#join, [separator]), + returnValue: Future.value('')) as _i4.Future); + @override + _i4.Future contains(Object? needle) => + (super.noSuchMethod(Invocation.method(#contains, [needle]), + returnValue: Future.value(false)) as _i4.Future); + @override + _i4.Future forEach(void Function(List)? action) => + (super.noSuchMethod(Invocation.method(#forEach, [action]), + returnValue: Future.value()) as _i4.Future); + @override + _i4.Future every(bool Function(List)? test) => + (super.noSuchMethod(Invocation.method(#every, [test]), + returnValue: Future.value(false)) as _i4.Future); + @override + _i4.Future any(bool Function(List)? test) => + (super.noSuchMethod(Invocation.method(#any, [test]), + returnValue: Future.value(false)) as _i4.Future); + @override + _i4.Stream cast() => (super.noSuchMethod(Invocation.method(#cast, []), + returnValue: Stream.empty()) as _i4.Stream); + @override + _i4.Future>> toList() => + (super.noSuchMethod(Invocation.method(#toList, []), + returnValue: Future>>.value(>[])) + as _i4.Future>>); + @override + _i4.Future>> toSet() => + (super.noSuchMethod(Invocation.method(#toSet, []), + returnValue: Future>>.value(>{})) + as _i4.Future>>); + @override + _i4.Future drain([E? futureValue]) => + (super.noSuchMethod(Invocation.method(#drain, [futureValue]), + returnValue: Future.value(null)) as _i4.Future); + @override + _i4.Stream> take(int? count) => + (super.noSuchMethod(Invocation.method(#take, [count]), + returnValue: Stream>.empty()) as _i4.Stream>); @override _i4.Stream> takeWhile(bool Function(List)? test) => - (super.noSuchMethod( - Invocation.method( - #takeWhile, - [test], - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); - @override - _i4.Stream> skip(int? count) => (super.noSuchMethod( - Invocation.method( - #skip, - [count], - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); + (super.noSuchMethod(Invocation.method(#takeWhile, [test]), + returnValue: Stream>.empty()) as _i4.Stream>); + @override + _i4.Stream> skip(int? count) => + (super.noSuchMethod(Invocation.method(#skip, [count]), + returnValue: Stream>.empty()) as _i4.Stream>); @override _i4.Stream> skipWhile(bool Function(List)? test) => - (super.noSuchMethod( - Invocation.method( - #skipWhile, - [test], - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); + (super.noSuchMethod(Invocation.method(#skipWhile, [test]), + returnValue: Stream>.empty()) as _i4.Stream>); @override _i4.Stream> distinct( - [bool Function( - List, - List, - )? equals]) => - (super.noSuchMethod( - Invocation.method( - #distinct, - [equals], - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); - @override - _i4.Future> firstWhere( - bool Function(List)? test, { - List Function()? orElse, - }) => + [bool Function(List, List)? equals]) => + (super.noSuchMethod(Invocation.method(#distinct, [equals]), + returnValue: Stream>.empty()) as _i4.Stream>); + @override + _i4.Future> firstWhere(bool Function(List)? test, + {List Function()? orElse}) => (super.noSuchMethod( - Invocation.method( - #firstWhere, - [test], - {#orElse: orElse}, - ), - returnValue: _i4.Future>.value([]), - returnValueForMissingStub: _i4.Future>.value([]), - ) as _i4.Future>); - @override - _i4.Future> lastWhere( - bool Function(List)? test, { - List Function()? orElse, - }) => + Invocation.method(#firstWhere, [test], {#orElse: orElse}), + returnValue: Future>.value([])) + as _i4.Future>); + @override + _i4.Future> lastWhere(bool Function(List)? test, + {List Function()? orElse}) => (super.noSuchMethod( - Invocation.method( - #lastWhere, - [test], - {#orElse: orElse}, - ), - returnValue: _i4.Future>.value([]), - returnValueForMissingStub: _i4.Future>.value([]), - ) as _i4.Future>); - @override - _i4.Future> singleWhere( - bool Function(List)? test, { - List Function()? orElse, - }) => + Invocation.method(#lastWhere, [test], {#orElse: orElse}), + returnValue: Future>.value([])) + as _i4.Future>); + @override + _i4.Future> singleWhere(bool Function(List)? test, + {List Function()? orElse}) => (super.noSuchMethod( - Invocation.method( - #singleWhere, - [test], - {#orElse: orElse}, - ), - returnValue: _i4.Future>.value([]), - returnValueForMissingStub: _i4.Future>.value([]), - ) as _i4.Future>); + Invocation.method(#singleWhere, [test], {#orElse: orElse}), + returnValue: Future>.value([])) + as _i4.Future>); @override _i4.Future> elementAt(int? index) => (super.noSuchMethod( - Invocation.method( - #elementAt, - [index], - ), - returnValue: _i4.Future>.value([]), - returnValueForMissingStub: _i4.Future>.value([]), - ) as _i4.Future>); - @override - _i4.Stream> timeout( - Duration? timeLimit, { - void Function(_i4.EventSink>)? onTimeout, - }) => + Invocation.method(#elementAt, [index]), + returnValue: Future>.value([])) as _i4.Future>); + @override + _i4.Stream> timeout(Duration? timeLimit, + {void Function(_i4.EventSink>)? onTimeout}) => (super.noSuchMethod( - Invocation.method( - #timeout, - [timeLimit], - {#onTimeout: onTimeout}, - ), - returnValue: _i4.Stream>.empty(), - returnValueForMissingStub: _i4.Stream>.empty(), - ) as _i4.Stream>); + Invocation.method(#timeout, [timeLimit], {#onTimeout: onTimeout}), + returnValue: Stream>.empty()) as _i4.Stream>); } /// A class which mocks [HttpHeaders]. /// /// See the documentation for Mockito's code generation for more information. class MockHttpHeaders extends _i1.Mock implements _i2.HttpHeaders { + MockHttpHeaders() { + _i1.throwOnMissingStub(this); + } + + @override + set date(DateTime? _date) => + super.noSuchMethod(Invocation.setter(#date, _date), + returnValueForMissingStub: null); + @override + set expires(DateTime? _expires) => + super.noSuchMethod(Invocation.setter(#expires, _expires), + returnValueForMissingStub: null); @override - set date(DateTime? _date) => super.noSuchMethod( - Invocation.setter( - #date, - _date, - ), - returnValueForMissingStub: null, - ); - @override - set expires(DateTime? _expires) => super.noSuchMethod( - Invocation.setter( - #expires, - _expires, - ), - returnValueForMissingStub: null, - ); - @override - set ifModifiedSince(DateTime? _ifModifiedSince) => super.noSuchMethod( - Invocation.setter( - #ifModifiedSince, - _ifModifiedSince, - ), - returnValueForMissingStub: null, - ); - @override - set host(String? _host) => super.noSuchMethod( - Invocation.setter( - #host, - _host, - ), - returnValueForMissingStub: null, - ); - @override - set port(int? _port) => super.noSuchMethod( - Invocation.setter( - #port, - _port, - ), - returnValueForMissingStub: null, - ); - @override - set contentType(_i2.ContentType? _contentType) => super.noSuchMethod( - Invocation.setter( - #contentType, - _contentType, - ), - returnValueForMissingStub: null, - ); - @override - int get contentLength => (super.noSuchMethod( - Invocation.getter(#contentLength), - returnValue: 0, - returnValueForMissingStub: 0, - ) as int); - @override - set contentLength(int? _contentLength) => super.noSuchMethod( - Invocation.setter( - #contentLength, - _contentLength, - ), - returnValueForMissingStub: null, - ); - @override - bool get persistentConnection => (super.noSuchMethod( - Invocation.getter(#persistentConnection), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); + set ifModifiedSince(DateTime? _ifModifiedSince) => + super.noSuchMethod(Invocation.setter(#ifModifiedSince, _ifModifiedSince), + returnValueForMissingStub: null); + @override + set host(String? _host) => super.noSuchMethod(Invocation.setter(#host, _host), + returnValueForMissingStub: null); + @override + set port(int? _port) => super.noSuchMethod(Invocation.setter(#port, _port), + returnValueForMissingStub: null); + @override + set contentType(_i2.ContentType? _contentType) => + super.noSuchMethod(Invocation.setter(#contentType, _contentType), + returnValueForMissingStub: null); + @override + int get contentLength => + (super.noSuchMethod(Invocation.getter(#contentLength), returnValue: 0) + as int); + @override + set contentLength(int? _contentLength) => + super.noSuchMethod(Invocation.setter(#contentLength, _contentLength), + returnValueForMissingStub: null); + @override + bool get persistentConnection => + (super.noSuchMethod(Invocation.getter(#persistentConnection), + returnValue: false) as bool); @override set persistentConnection(bool? _persistentConnection) => super.noSuchMethod( - Invocation.setter( - #persistentConnection, - _persistentConnection, - ), - returnValueForMissingStub: null, - ); - @override - bool get chunkedTransferEncoding => (super.noSuchMethod( - Invocation.getter(#chunkedTransferEncoding), - returnValue: false, - returnValueForMissingStub: false, - ) as bool); + Invocation.setter(#persistentConnection, _persistentConnection), + returnValueForMissingStub: null); + @override + bool get chunkedTransferEncoding => + (super.noSuchMethod(Invocation.getter(#chunkedTransferEncoding), + returnValue: false) as bool); @override set chunkedTransferEncoding(bool? _chunkedTransferEncoding) => super.noSuchMethod( - Invocation.setter( - #chunkedTransferEncoding, - _chunkedTransferEncoding, - ), - returnValueForMissingStub: null, - ); - @override - List? operator [](String? name) => (super.noSuchMethod( - Invocation.method( - #[], - [name], - ), - returnValueForMissingStub: null, - ) as List?); - @override - String? value(String? name) => (super.noSuchMethod( - Invocation.method( - #value, - [name], - ), - returnValueForMissingStub: null, - ) as String?); - @override - void add( - String? name, - Object? value, { - bool? preserveHeaderCase = false, - }) => - super.noSuchMethod( - Invocation.method( - #add, - [ - name, - value, - ], - {#preserveHeaderCase: preserveHeaderCase}, - ), - returnValueForMissingStub: null, - ); - @override - void set( - String? name, - Object? value, { - bool? preserveHeaderCase = false, - }) => - super.noSuchMethod( - Invocation.method( - #set, - [ - name, - value, - ], - {#preserveHeaderCase: preserveHeaderCase}, - ), - returnValueForMissingStub: null, - ); - @override - void remove( - String? name, - Object? value, - ) => + Invocation.setter(#chunkedTransferEncoding, _chunkedTransferEncoding), + returnValueForMissingStub: null); + @override + List? operator [](String? name) => + (super.noSuchMethod(Invocation.method(#[], [name])) as List?); + @override + String? value(String? name) => + (super.noSuchMethod(Invocation.method(#value, [name])) as String?); + @override + void add(String? name, Object? value, {bool? preserveHeaderCase = false}) => super.noSuchMethod( - Invocation.method( - #remove, - [ - name, - value, - ], - ), - returnValueForMissingStub: null, - ); - @override - void removeAll(String? name) => super.noSuchMethod( - Invocation.method( - #removeAll, - [name], - ), - returnValueForMissingStub: null, - ); - @override - void forEach( - void Function( - String, - List, - )? action) => + Invocation.method( + #add, [name, value], {#preserveHeaderCase: preserveHeaderCase}), + returnValueForMissingStub: null); + @override + void set(String? name, Object? value, {bool? preserveHeaderCase = false}) => super.noSuchMethod( - Invocation.method( - #forEach, - [action], - ), - returnValueForMissingStub: null, - ); - @override - void noFolding(String? name) => super.noSuchMethod( - Invocation.method( - #noFolding, - [name], - ), - returnValueForMissingStub: null, - ); - @override - void clear() => super.noSuchMethod( - Invocation.method( - #clear, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method( + #set, [name, value], {#preserveHeaderCase: preserveHeaderCase}), + returnValueForMissingStub: null); + @override + void remove(String? name, Object? value) => + super.noSuchMethod(Invocation.method(#remove, [name, value]), + returnValueForMissingStub: null); + @override + void removeAll(String? name) => + super.noSuchMethod(Invocation.method(#removeAll, [name]), + returnValueForMissingStub: null); + @override + void forEach(void Function(String, List)? action) => + super.noSuchMethod(Invocation.method(#forEach, [action]), + returnValueForMissingStub: null); + @override + void noFolding(String? name) => + super.noSuchMethod(Invocation.method(#noFolding, [name]), + returnValueForMissingStub: null); + @override + void clear() => super.noSuchMethod(Invocation.method(#clear, []), + returnValueForMissingStub: null); }