From 83877d4d696ad5325218b7f7d4864a826b0cd104 Mon Sep 17 00:00:00 2001 From: tsutsu3 Date: Sun, 2 Feb 2025 00:12:15 +0900 Subject: [PATCH 1/5] Refactor test folder structure --- lib/models/api/v6/metrics/query.freezed.dart | 132 +- lib/models/api/v6/metrics/query.g.dart | 12 +- test/full_coverage_test.dart | 1 + .../v5/api_gateway_v5_test.mocks.dart | 300 +-- .../v6/api_gateway_v6_test.mocks.dart | 300 +-- .../app_config_provider_test.mocks.dart | 237 +- .../domains_list_provider_test.mocks.dart | 652 ++---- .../filters_provider_test.mocks.dart | 249 +- .../servers_provider_test.mocks.dart | 774 +++---- test/widgets/domains/domains_test.mocks.dart | 1032 --------- test/widgets/helpers.mocks.dart | 2052 +++++++---------- .../queries_last_hours_line_test.mocks.dart | 437 ---- .../{ => screens}/app_logs/app_logs_test.dart | 2 +- .../{ => screens}/domains/domains_test.dart | 2 +- .../screens/domains/domains_test.mocks.dart | 825 +++++++ .../{ => screens}/home/home_charts_test.dart | 2 +- .../widgets/{ => screens}/home/home_test.dart | 2 +- .../widgets/queries_last_hours_line_test.dart | 2 +- .../queries_last_hours_line_test.mocks.dart | 385 ++++ .../logs/clients_filters_modal_test.dart | 2 +- .../logs/logs_filters_modal_test.dart | 2 +- .../widgets/{ => screens}/logs/logs_test.dart | 2 +- .../logs/status_filters_modal_test.dart | 2 +- .../servers/add_server_fullscreen_test.dart | 2 +- .../add_server_fullscreen_test.mocks.dart | 833 +++++++ .../app_settings/advanced_options_test.dart | 2 +- .../advanced_options_test.mocks.dart | 558 +++++ .../advanced_options_test.dart | 2 +- .../app_unlock_setup_modal_test.dart | 2 +- .../advanced_settings/reset_modal_test.dart | 2 +- .../statistics_visualization_screen_test.dart | 2 +- .../auto_refresh_time_screen_test.dart | 2 +- .../{ => screens}/settings/settings_test.dart | 2 +- .../statistics/statistics_test.dart | 2 +- test/widgets/{ => screens}/unlock_test.dart | 2 +- test/widgets/{ => screens}/utils.dart | 0 .../add_server_fullscreen_test.mocks.dart | 1048 --------- .../advanced_options_test.mocks.dart | 650 ------ 38 files changed, 4568 insertions(+), 5947 deletions(-) delete mode 100644 test/widgets/domains/domains_test.mocks.dart delete mode 100644 test/widgets/home/widgets/queries_last_hours_line_test.mocks.dart rename test/widgets/{ => screens}/app_logs/app_logs_test.dart (99%) rename test/widgets/{ => screens}/domains/domains_test.dart (99%) create mode 100644 test/widgets/screens/domains/domains_test.mocks.dart rename test/widgets/{ => screens}/home/home_charts_test.dart (99%) rename test/widgets/{ => screens}/home/home_test.dart (99%) rename test/widgets/{ => screens}/home/widgets/queries_last_hours_line_test.dart (99%) create mode 100644 test/widgets/screens/home/widgets/queries_last_hours_line_test.mocks.dart rename test/widgets/{ => screens}/logs/clients_filters_modal_test.dart (98%) rename test/widgets/{ => screens}/logs/logs_filters_modal_test.dart (98%) rename test/widgets/{ => screens}/logs/logs_test.dart (99%) rename test/widgets/{ => screens}/logs/status_filters_modal_test.dart (99%) rename test/widgets/{ => screens}/servers/add_server_fullscreen_test.dart (99%) create mode 100644 test/widgets/screens/servers/add_server_fullscreen_test.mocks.dart rename test/widgets/{ => screens}/settings/app_settings/advanced_options_test.dart (99%) create mode 100644 test/widgets/screens/settings/app_settings/advanced_options_test.mocks.dart rename test/widgets/{ => screens}/settings/app_settings/advanced_settings/advanced_options_test.dart (99%) rename test/widgets/{ => screens}/settings/app_settings/advanced_settings/app_unlock_setup_modal_test.dart (99%) rename test/widgets/{ => screens}/settings/app_settings/advanced_settings/reset_modal_test.dart (98%) rename test/widgets/{ => screens}/settings/app_settings/advanced_settings/statistics_visualization_screen_test.dart (98%) rename test/widgets/{ => screens}/settings/app_settings/auto_refresh_time_screen_test.dart (99%) rename test/widgets/{ => screens}/settings/settings_test.dart (99%) rename test/widgets/{ => screens}/statistics/statistics_test.dart (99%) rename test/widgets/{ => screens}/unlock_test.dart (98%) rename test/widgets/{ => screens}/utils.dart (100%) delete mode 100644 test/widgets/servers/add_server_fullscreen_test.mocks.dart delete mode 100644 test/widgets/settings/app_settings/advanced_options_test.mocks.dart diff --git a/lib/models/api/v6/metrics/query.freezed.dart b/lib/models/api/v6/metrics/query.freezed.dart index 1d2308d6..8a6d6e15 100644 --- a/lib/models/api/v6/metrics/query.freezed.dart +++ b/lib/models/api/v6/metrics/query.freezed.dart @@ -289,11 +289,11 @@ mixin _$Query { double get time => throw _privateConstructorUsedError; String get type => throw _privateConstructorUsedError; String get domain => throw _privateConstructorUsedError; + Client get client => throw _privateConstructorUsedError; + Reply get reply => throw _privateConstructorUsedError; String? get cname => throw _privateConstructorUsedError; String? get status => throw _privateConstructorUsedError; - Client get client => throw _privateConstructorUsedError; String? get dnssec => throw _privateConstructorUsedError; - Reply get reply => throw _privateConstructorUsedError; @JsonKey(name: 'list_id') int? get listId => throw _privateConstructorUsedError; String? get upstream => throw _privateConstructorUsedError; @@ -317,11 +317,11 @@ abstract class $QueryCopyWith<$Res> { double time, String type, String domain, + Client client, + Reply reply, String? cname, String? status, - Client client, String? dnssec, - Reply reply, @JsonKey(name: 'list_id') int? listId, String? upstream}); @@ -348,11 +348,11 @@ class _$QueryCopyWithImpl<$Res, $Val extends Query> Object? time = null, Object? type = null, Object? domain = null, + Object? client = null, + Object? reply = null, Object? cname = freezed, Object? status = freezed, - Object? client = null, Object? dnssec = freezed, - Object? reply = null, Object? listId = freezed, Object? upstream = freezed, }) { @@ -373,6 +373,14 @@ class _$QueryCopyWithImpl<$Res, $Val extends Query> ? _value.domain : domain // ignore: cast_nullable_to_non_nullable as String, + client: null == client + ? _value.client + : client // ignore: cast_nullable_to_non_nullable + as Client, + reply: null == reply + ? _value.reply + : reply // ignore: cast_nullable_to_non_nullable + as Reply, cname: freezed == cname ? _value.cname : cname // ignore: cast_nullable_to_non_nullable @@ -381,18 +389,10 @@ class _$QueryCopyWithImpl<$Res, $Val extends Query> ? _value.status : status // ignore: cast_nullable_to_non_nullable as String?, - client: null == client - ? _value.client - : client // ignore: cast_nullable_to_non_nullable - as Client, dnssec: freezed == dnssec ? _value.dnssec : dnssec // ignore: cast_nullable_to_non_nullable as String?, - reply: null == reply - ? _value.reply - : reply // ignore: cast_nullable_to_non_nullable - as Reply, listId: freezed == listId ? _value.listId : listId // ignore: cast_nullable_to_non_nullable @@ -437,11 +437,11 @@ abstract class _$$QueryImplCopyWith<$Res> implements $QueryCopyWith<$Res> { double time, String type, String domain, + Client client, + Reply reply, String? cname, String? status, - Client client, String? dnssec, - Reply reply, @JsonKey(name: 'list_id') int? listId, String? upstream}); @@ -468,11 +468,11 @@ class __$$QueryImplCopyWithImpl<$Res> Object? time = null, Object? type = null, Object? domain = null, + Object? client = null, + Object? reply = null, Object? cname = freezed, Object? status = freezed, - Object? client = null, Object? dnssec = freezed, - Object? reply = null, Object? listId = freezed, Object? upstream = freezed, }) { @@ -493,6 +493,14 @@ class __$$QueryImplCopyWithImpl<$Res> ? _value.domain : domain // ignore: cast_nullable_to_non_nullable as String, + client: null == client + ? _value.client + : client // ignore: cast_nullable_to_non_nullable + as Client, + reply: null == reply + ? _value.reply + : reply // ignore: cast_nullable_to_non_nullable + as Reply, cname: freezed == cname ? _value.cname : cname // ignore: cast_nullable_to_non_nullable @@ -501,18 +509,10 @@ class __$$QueryImplCopyWithImpl<$Res> ? _value.status : status // ignore: cast_nullable_to_non_nullable as String?, - client: null == client - ? _value.client - : client // ignore: cast_nullable_to_non_nullable - as Client, dnssec: freezed == dnssec ? _value.dnssec : dnssec // ignore: cast_nullable_to_non_nullable as String?, - reply: null == reply - ? _value.reply - : reply // ignore: cast_nullable_to_non_nullable - as Reply, listId: freezed == listId ? _value.listId : listId // ignore: cast_nullable_to_non_nullable @@ -533,11 +533,11 @@ class _$QueryImpl implements _Query { required this.time, required this.type, required this.domain, + required this.client, + required this.reply, this.cname, this.status, - required this.client, this.dnssec, - required this.reply, @JsonKey(name: 'list_id') this.listId, this.upstream}); @@ -553,16 +553,16 @@ class _$QueryImpl implements _Query { @override final String domain; @override + final Client client; + @override + final Reply reply; + @override final String? cname; @override final String? status; @override - final Client client; - @override final String? dnssec; @override - final Reply reply; - @override @JsonKey(name: 'list_id') final int? listId; @override @@ -570,7 +570,7 @@ class _$QueryImpl implements _Query { @override String toString() { - return 'Query(id: $id, time: $time, type: $type, domain: $domain, cname: $cname, status: $status, client: $client, dnssec: $dnssec, reply: $reply, listId: $listId, upstream: $upstream)'; + return 'Query(id: $id, time: $time, type: $type, domain: $domain, client: $client, reply: $reply, cname: $cname, status: $status, dnssec: $dnssec, listId: $listId, upstream: $upstream)'; } @override @@ -582,11 +582,11 @@ class _$QueryImpl implements _Query { (identical(other.time, time) || other.time == time) && (identical(other.type, type) || other.type == type) && (identical(other.domain, domain) || other.domain == domain) && + (identical(other.client, client) || other.client == client) && + (identical(other.reply, reply) || other.reply == reply) && (identical(other.cname, cname) || other.cname == cname) && (identical(other.status, status) || other.status == status) && - (identical(other.client, client) || other.client == client) && (identical(other.dnssec, dnssec) || other.dnssec == dnssec) && - (identical(other.reply, reply) || other.reply == reply) && (identical(other.listId, listId) || other.listId == listId) && (identical(other.upstream, upstream) || other.upstream == upstream)); @@ -594,8 +594,8 @@ class _$QueryImpl implements _Query { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, time, type, domain, cname, - status, client, dnssec, reply, listId, upstream); + int get hashCode => Object.hash(runtimeType, id, time, type, domain, client, + reply, cname, status, dnssec, listId, upstream); /// Create a copy of Query /// with the given fields replaced by the non-null parameter values. @@ -619,11 +619,11 @@ abstract class _Query implements Query { required final double time, required final String type, required final String domain, + required final Client client, + required final Reply reply, final String? cname, final String? status, - required final Client client, final String? dnssec, - required final Reply reply, @JsonKey(name: 'list_id') final int? listId, final String? upstream}) = _$QueryImpl; @@ -638,16 +638,16 @@ abstract class _Query implements Query { @override String get domain; @override + Client get client; + @override + Reply get reply; + @override String? get cname; @override String? get status; @override - Client get client; - @override String? get dnssec; @override - Reply get reply; - @override @JsonKey(name: 'list_id') int? get listId; @override @@ -829,8 +829,8 @@ Reply _$ReplyFromJson(Map json) { /// @nodoc mixin _$Reply { - String? get type => throw _privateConstructorUsedError; double get time => throw _privateConstructorUsedError; + String? get type => throw _privateConstructorUsedError; /// Serializes this Reply to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -846,7 +846,7 @@ abstract class $ReplyCopyWith<$Res> { factory $ReplyCopyWith(Reply value, $Res Function(Reply) then) = _$ReplyCopyWithImpl<$Res, Reply>; @useResult - $Res call({String? type, double time}); + $Res call({double time, String? type}); } /// @nodoc @@ -864,18 +864,18 @@ class _$ReplyCopyWithImpl<$Res, $Val extends Reply> @pragma('vm:prefer-inline') @override $Res call({ - Object? type = freezed, Object? time = null, + Object? type = freezed, }) { return _then(_value.copyWith( - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String?, time: null == time ? _value.time : time // ignore: cast_nullable_to_non_nullable as double, + type: freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String?, ) as $Val); } } @@ -887,7 +887,7 @@ abstract class _$$ReplyImplCopyWith<$Res> implements $ReplyCopyWith<$Res> { __$$ReplyImplCopyWithImpl<$Res>; @override @useResult - $Res call({String? type, double time}); + $Res call({double time, String? type}); } /// @nodoc @@ -903,18 +903,18 @@ class __$$ReplyImplCopyWithImpl<$Res> @pragma('vm:prefer-inline') @override $Res call({ - Object? type = freezed, Object? time = null, + Object? type = freezed, }) { return _then(_$ReplyImpl( - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String?, time: null == time ? _value.time : time // ignore: cast_nullable_to_non_nullable as double, + type: freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String?, )); } } @@ -922,19 +922,19 @@ class __$$ReplyImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$ReplyImpl implements _Reply { - const _$ReplyImpl({this.type, required this.time}); + const _$ReplyImpl({required this.time, this.type}); factory _$ReplyImpl.fromJson(Map json) => _$$ReplyImplFromJson(json); - @override - final String? type; @override final double time; + @override + final String? type; @override String toString() { - return 'Reply(type: $type, time: $time)'; + return 'Reply(time: $time, type: $type)'; } @override @@ -942,13 +942,13 @@ class _$ReplyImpl implements _Reply { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ReplyImpl && - (identical(other.type, type) || other.type == type) && - (identical(other.time, time) || other.time == time)); + (identical(other.time, time) || other.time == time) && + (identical(other.type, type) || other.type == type)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, type, time); + int get hashCode => Object.hash(runtimeType, time, type); /// Create a copy of Reply /// with the given fields replaced by the non-null parameter values. @@ -967,15 +967,15 @@ class _$ReplyImpl implements _Reply { } abstract class _Reply implements Reply { - const factory _Reply({final String? type, required final double time}) = + const factory _Reply({required final double time, final String? type}) = _$ReplyImpl; factory _Reply.fromJson(Map json) = _$ReplyImpl.fromJson; - @override - String? get type; @override double get time; + @override + String? get type; /// Create a copy of Reply /// with the given fields replaced by the non-null parameter values. diff --git a/lib/models/api/v6/metrics/query.g.dart b/lib/models/api/v6/metrics/query.g.dart index 6fea48fa..f810a7af 100644 --- a/lib/models/api/v6/metrics/query.g.dart +++ b/lib/models/api/v6/metrics/query.g.dart @@ -33,11 +33,11 @@ _$QueryImpl _$$QueryImplFromJson(Map json) => _$QueryImpl( time: (json['time'] as num).toDouble(), type: json['type'] as String, domain: json['domain'] as String, + client: Client.fromJson(json['client'] as Map), + reply: Reply.fromJson(json['reply'] as Map), cname: json['cname'] as String?, status: json['status'] as String?, - client: Client.fromJson(json['client'] as Map), dnssec: json['dnssec'] as String?, - reply: Reply.fromJson(json['reply'] as Map), listId: (json['list_id'] as num?)?.toInt(), upstream: json['upstream'] as String?, ); @@ -48,11 +48,11 @@ Map _$$QueryImplToJson(_$QueryImpl instance) => 'time': instance.time, 'type': instance.type, 'domain': instance.domain, + 'client': instance.client, + 'reply': instance.reply, 'cname': instance.cname, 'status': instance.status, - 'client': instance.client, 'dnssec': instance.dnssec, - 'reply': instance.reply, 'list_id': instance.listId, 'upstream': instance.upstream, }; @@ -69,12 +69,12 @@ Map _$$ClientImplToJson(_$ClientImpl instance) => }; _$ReplyImpl _$$ReplyImplFromJson(Map json) => _$ReplyImpl( - type: json['type'] as String?, time: (json['time'] as num).toDouble(), + type: json['type'] as String?, ); Map _$$ReplyImplToJson(_$ReplyImpl instance) => { - 'type': instance.type, 'time': instance.time, + 'type': instance.type, }; diff --git a/test/full_coverage_test.dart b/test/full_coverage_test.dart index 043ae108..c5dfad7f 100644 --- a/test/full_coverage_test.dart +++ b/test/full_coverage_test.dart @@ -19,6 +19,7 @@ import 'package:pi_hole_client/functions/colors.dart'; import 'package:pi_hole_client/functions/conversions.dart'; import 'package:pi_hole_client/functions/encode_basic_auth.dart'; import 'package:pi_hole_client/functions/format.dart'; +import 'package:pi_hole_client/functions/graph.dart'; import 'package:pi_hole_client/functions/logger.dart'; import 'package:pi_hole_client/functions/misc.dart'; import 'package:pi_hole_client/functions/open_url.dart'; diff --git a/test/ut/gateways/v5/api_gateway_v5_test.mocks.dart b/test/ut/gateways/v5/api_gateway_v5_test.mocks.dart index d910073f..9d88be4c 100644 --- a/test/ut/gateways/v5/api_gateway_v5_test.mocks.dart +++ b/test/ut/gateways/v5/api_gateway_v5_test.mocks.dart @@ -26,24 +26,14 @@ import 'package:mockito/src/dummies.dart' as _i5; // ignore_for_file: subtype_of_sealed_class class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { - _FakeResponse_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse { - _FakeStreamedResponse_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeStreamedResponse_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Client]. @@ -55,46 +45,30 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i3.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#head, [url], {#headers: headers}), + ), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#get, [url], {#headers: headers}), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> post( @@ -104,28 +78,23 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> put( @@ -135,28 +104,23 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> patch( @@ -166,28 +130,23 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> delete( @@ -197,49 +156,36 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future read( - Uri? url, { - Map? headers, - }) => + _i3.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future.value(_i5.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future); + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i3.Future.value( + _i5.dummyValue( + this, + Invocation.method(#read, [url], {#headers: headers}), + ), + ), + ) + as _i3.Future); @override _i3.Future<_i6.Uint8List> readBytes( @@ -247,37 +193,27 @@ class MockClient extends _i1.Mock implements _i2.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), - ) as _i3.Future<_i6.Uint8List>); + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), + ) + as _i3.Future<_i6.Uint8List>); @override _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: - _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i3.Future<_i2.StreamedResponse>); + Invocation.method(#send, [request]), + returnValue: _i3.Future<_i2.StreamedResponse>.value( + _FakeStreamedResponse_1( + this, + Invocation.method(#send, [request]), + ), + ), + ) + as _i3.Future<_i2.StreamedResponse>); @override void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#close, []), + returnValueForMissingStub: null, + ); } diff --git a/test/ut/gateways/v6/api_gateway_v6_test.mocks.dart b/test/ut/gateways/v6/api_gateway_v6_test.mocks.dart index 25a37016..5c01be88 100644 --- a/test/ut/gateways/v6/api_gateway_v6_test.mocks.dart +++ b/test/ut/gateways/v6/api_gateway_v6_test.mocks.dart @@ -26,24 +26,14 @@ import 'package:mockito/src/dummies.dart' as _i5; // ignore_for_file: subtype_of_sealed_class class _FakeResponse_0 extends _i1.SmartFake implements _i2.Response { - _FakeResponse_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeStreamedResponse_1 extends _i1.SmartFake implements _i2.StreamedResponse { - _FakeStreamedResponse_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeStreamedResponse_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [Client]. @@ -55,46 +45,30 @@ class MockClient extends _i1.Mock implements _i2.Client { } @override - _i3.Future<_i2.Response> head( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> head(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #head, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#head, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#head, [url], {#headers: headers}), + ), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future<_i2.Response> get( - Uri? url, { - Map? headers, - }) => + _i3.Future<_i2.Response> get(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #get, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method(#get, [url], {#headers: headers}), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method(#get, [url], {#headers: headers}), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> post( @@ -104,28 +78,23 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #post, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #post, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> put( @@ -135,28 +104,23 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #put, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #put, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> patch( @@ -166,28 +130,23 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #patch, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #patch, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override _i3.Future<_i2.Response> delete( @@ -197,49 +156,36 @@ class MockClient extends _i1.Mock implements _i2.Client { _i4.Encoding? encoding, }) => (super.noSuchMethod( - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - returnValue: _i3.Future<_i2.Response>.value(_FakeResponse_0( - this, - Invocation.method( - #delete, - [url], - { - #headers: headers, - #body: body, - #encoding: encoding, - }, - ), - )), - ) as _i3.Future<_i2.Response>); + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + returnValue: _i3.Future<_i2.Response>.value( + _FakeResponse_0( + this, + Invocation.method( + #delete, + [url], + {#headers: headers, #body: body, #encoding: encoding}, + ), + ), + ), + ) + as _i3.Future<_i2.Response>); @override - _i3.Future read( - Uri? url, { - Map? headers, - }) => + _i3.Future read(Uri? url, {Map? headers}) => (super.noSuchMethod( - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future.value(_i5.dummyValue( - this, - Invocation.method( - #read, - [url], - {#headers: headers}, - ), - )), - ) as _i3.Future); + Invocation.method(#read, [url], {#headers: headers}), + returnValue: _i3.Future.value( + _i5.dummyValue( + this, + Invocation.method(#read, [url], {#headers: headers}), + ), + ), + ) + as _i3.Future); @override _i3.Future<_i6.Uint8List> readBytes( @@ -247,37 +193,27 @@ class MockClient extends _i1.Mock implements _i2.Client { Map? headers, }) => (super.noSuchMethod( - Invocation.method( - #readBytes, - [url], - {#headers: headers}, - ), - returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), - ) as _i3.Future<_i6.Uint8List>); + Invocation.method(#readBytes, [url], {#headers: headers}), + returnValue: _i3.Future<_i6.Uint8List>.value(_i6.Uint8List(0)), + ) + as _i3.Future<_i6.Uint8List>); @override _i3.Future<_i2.StreamedResponse> send(_i2.BaseRequest? request) => (super.noSuchMethod( - Invocation.method( - #send, - [request], - ), - returnValue: - _i3.Future<_i2.StreamedResponse>.value(_FakeStreamedResponse_1( - this, - Invocation.method( - #send, - [request], - ), - )), - ) as _i3.Future<_i2.StreamedResponse>); + Invocation.method(#send, [request]), + returnValue: _i3.Future<_i2.StreamedResponse>.value( + _FakeStreamedResponse_1( + this, + Invocation.method(#send, [request]), + ), + ), + ) + as _i3.Future<_i2.StreamedResponse>); @override void close() => super.noSuchMethod( - Invocation.method( - #close, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#close, []), + returnValueForMissingStub: null, + ); } diff --git a/test/ut/providers/app_config_provider_test.mocks.dart b/test/ut/providers/app_config_provider_test.mocks.dart index 0e8d2ee7..ecc8fe6b 100644 --- a/test/ut/providers/app_config_provider_test.mocks.dart +++ b/test/ut/providers/app_config_provider_test.mocks.dart @@ -26,34 +26,19 @@ import 'package:sqflite/sqflite.dart' as _i3; // ignore_for_file: subtype_of_sealed_class class _FakeAppDbData_0 extends _i1.SmartFake implements _i2.AppDbData { - _FakeAppDbData_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAppDbData_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDatabase_1 extends _i1.SmartFake implements _i3.Database { - _FakeDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDatabase_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakePiHoleClientData_2 extends _i1.SmartFake implements _i2.PiHoleClientData { - _FakePiHoleClientData_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakePiHoleClientData_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [DatabaseRepository]. @@ -66,132 +51,116 @@ class MockDatabaseRepository extends _i1.Mock } @override - List<_i2.ServerDbData> get servers => (super.noSuchMethod( - Invocation.getter(#servers), - returnValue: <_i2.ServerDbData>[], - ) as List<_i2.ServerDbData>); + List<_i2.ServerDbData> get servers => + (super.noSuchMethod( + Invocation.getter(#servers), + returnValue: <_i2.ServerDbData>[], + ) + as List<_i2.ServerDbData>); @override - _i2.AppDbData get appConfig => (super.noSuchMethod( - Invocation.getter(#appConfig), - returnValue: _FakeAppDbData_0( - this, - Invocation.getter(#appConfig), - ), - ) as _i2.AppDbData); + _i2.AppDbData get appConfig => + (super.noSuchMethod( + Invocation.getter(#appConfig), + returnValue: _FakeAppDbData_0(this, Invocation.getter(#appConfig)), + ) + as _i2.AppDbData); @override - _i3.Database get dbInstance => (super.noSuchMethod( - Invocation.getter(#dbInstance), - returnValue: _FakeDatabase_1( - this, - Invocation.getter(#dbInstance), - ), - ) as _i3.Database); + _i3.Database get dbInstance => + (super.noSuchMethod( + Invocation.getter(#dbInstance), + returnValue: _FakeDatabase_1(this, Invocation.getter(#dbInstance)), + ) + as _i3.Database); @override - _i5.Future initialize({String? path}) => (super.noSuchMethod( - Invocation.method( - #initialize, - [], - {#path: path}, - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + _i5.Future initialize({String? path}) => + (super.noSuchMethod( + Invocation.method(#initialize, [], {#path: path}), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) + as _i5.Future); @override - Map toDict() => (super.noSuchMethod( - Invocation.method( - #toDict, - [], - ), - returnValue: {}, - ) as Map); + Map toDict() => + (super.noSuchMethod( + Invocation.method(#toDict, []), + returnValue: {}, + ) + as Map); @override _i5.Future<_i2.PiHoleClientData> loadDb({String? path}) => (super.noSuchMethod( - Invocation.method( - #loadDb, - [], - {#path: path}, - ), - returnValue: - _i5.Future<_i2.PiHoleClientData>.value(_FakePiHoleClientData_2( - this, - Invocation.method( - #loadDb, - [], - {#path: path}, - ), - )), - ) as _i5.Future<_i2.PiHoleClientData>); + Invocation.method(#loadDb, [], {#path: path}), + returnValue: _i5.Future<_i2.PiHoleClientData>.value( + _FakePiHoleClientData_2( + this, + Invocation.method(#loadDb, [], {#path: path}), + ), + ), + ) + as _i5.Future<_i2.PiHoleClientData>); @override - _i5.Future closeDb() => (super.noSuchMethod( - Invocation.method( - #closeDb, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future closeDb() => + (super.noSuchMethod( + Invocation.method(#closeDb, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override - _i5.Future saveServerQuery(_i6.Server? server) => (super.noSuchMethod( - Invocation.method( - #saveServerQuery, - [server], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); + _i5.Future saveServerQuery(_i6.Server? server) => + (super.noSuchMethod( + Invocation.method(#saveServerQuery, [server]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future editServerQuery(_i6.Server? server) => (super.noSuchMethod( - Invocation.method( - #editServerQuery, - [server], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future editServerQuery(_i6.Server? server) => + (super.noSuchMethod( + Invocation.method(#editServerQuery, [server]), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override - _i5.Future setDefaultServerQuery(String? url) => (super.noSuchMethod( - Invocation.method( - #setDefaultServerQuery, - [url], - ), - returnValue: _i5.Future.value(), - ) as _i5.Future); + _i5.Future setDefaultServerQuery(String? url) => + (super.noSuchMethod( + Invocation.method(#setDefaultServerQuery, [url]), + returnValue: _i5.Future.value(), + ) + as _i5.Future); @override - _i5.Future removeServerQuery(String? address) => (super.noSuchMethod( - Invocation.method( - #removeServerQuery, - [address], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future removeServerQuery(String? address) => + (super.noSuchMethod( + Invocation.method(#removeServerQuery, [address]), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override - _i5.Future deleteServersDataQuery() => (super.noSuchMethod( - Invocation.method( - #deleteServersDataQuery, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future deleteServersDataQuery() => + (super.noSuchMethod( + Invocation.method(#deleteServersDataQuery, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override _i5.Future> checkUrlExistsQuery(String? url) => (super.noSuchMethod( - Invocation.method( - #checkUrlExistsQuery, - [url], - ), - returnValue: - _i5.Future>.value({}), - ) as _i5.Future>); + Invocation.method(#checkUrlExistsQuery, [url]), + returnValue: _i5.Future>.value( + {}, + ), + ) + as _i5.Future>); @override _i5.Future updateConfigQuery({ @@ -199,23 +168,19 @@ class MockDatabaseRepository extends _i1.Mock required Object? value, }) => (super.noSuchMethod( - Invocation.method( - #updateConfigQuery, - [], - { - #column: column, - #value: value, - }, - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + Invocation.method(#updateConfigQuery, [], { + #column: column, + #value: value, + }), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); @override - _i5.Future restoreAppConfigQuery() => (super.noSuchMethod( - Invocation.method( - #restoreAppConfigQuery, - [], - ), - returnValue: _i5.Future.value(false), - ) as _i5.Future); + _i5.Future restoreAppConfigQuery() => + (super.noSuchMethod( + Invocation.method(#restoreAppConfigQuery, []), + returnValue: _i5.Future.value(false), + ) + as _i5.Future); } diff --git a/test/ut/providers/domains_list_provider_test.mocks.dart b/test/ut/providers/domains_list_provider_test.mocks.dart index f7246374..ca95b1fd 100644 --- a/test/ut/providers/domains_list_provider_test.mocks.dart +++ b/test/ut/providers/domains_list_provider_test.mocks.dart @@ -34,121 +34,66 @@ import 'package:pi_hole_client/providers/servers_provider.dart' as _i6; // ignore_for_file: subtype_of_sealed_class class _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { - _FakeAppColors_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAppColors_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeServer_1 extends _i1.SmartFake implements _i3.Server { - _FakeServer_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeServer_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeResponse_2 extends _i1.SmartFake implements _i4.Response { - _FakeResponse_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLoginQueryResponse_3 extends _i1.SmartFake implements _i5.LoginQueryResponse { - _FakeLoginQueryResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLoginQueryResponse_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRealtimeStatusResponse_4 extends _i1.SmartFake implements _i5.RealtimeStatusResponse { - _FakeRealtimeStatusResponse_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRealtimeStatusResponse_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDisableServerResponse_5 extends _i1.SmartFake implements _i5.DisableServerResponse { - _FakeDisableServerResponse_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDisableServerResponse_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEnableServerResponse_6 extends _i1.SmartFake implements _i5.EnableServerResponse { - _FakeEnableServerResponse_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEnableServerResponse_6(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFetchOverTimeDataResponse_7 extends _i1.SmartFake implements _i5.FetchOverTimeDataResponse { - _FakeFetchOverTimeDataResponse_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFetchOverTimeDataResponse_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFetchLogsResponse_8 extends _i1.SmartFake implements _i5.FetchLogsResponse { - _FakeFetchLogsResponse_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFetchLogsResponse_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSetWhiteBlacklistResponse_9 extends _i1.SmartFake implements _i5.SetWhiteBlacklistResponse { - _FakeSetWhiteBlacklistResponse_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSetWhiteBlacklistResponse_9(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeGetDomainLists_10 extends _i1.SmartFake implements _i5.GetDomainLists { - _FakeGetDomainLists_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeGetDomainLists_10(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRemoveDomainFromListResponse_11 extends _i1.SmartFake @@ -156,21 +101,13 @@ class _FakeRemoveDomainFromListResponse_11 extends _i1.SmartFake _FakeRemoveDomainFromListResponse_11( Object parent, Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + ) : super(parent, parentInvocation); } class _FakeAddDomainToListResponse_12 extends _i1.SmartFake implements _i5.AddDomainToListResponse { - _FakeAddDomainToListResponse_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAddDomainToListResponse_12(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ServersProvider]. @@ -182,204 +119,164 @@ class MockServersProvider extends _i1.Mock implements _i6.ServersProvider { } @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); @override - List<_i3.Server> get getServersList => (super.noSuchMethod( - Invocation.getter(#getServersList), - returnValue: <_i3.Server>[], - ) as List<_i3.Server>); + List<_i3.Server> get getServersList => + (super.noSuchMethod( + Invocation.getter(#getServersList), + returnValue: <_i3.Server>[], + ) + as List<_i3.Server>); @override - int get numShown => (super.noSuchMethod( - Invocation.getter(#numShown), - returnValue: 0, - ) as int); + int get numShown => + (super.noSuchMethod(Invocation.getter(#numShown), returnValue: 0) as int); @override - List<_i7.QueryStatus> get queryStatuses => (super.noSuchMethod( - Invocation.getter(#queryStatuses), - returnValue: <_i7.QueryStatus>[], - ) as List<_i7.QueryStatus>); + List<_i7.QueryStatus> get queryStatuses => + (super.noSuchMethod( + Invocation.getter(#queryStatuses), + returnValue: <_i7.QueryStatus>[], + ) + as List<_i7.QueryStatus>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void update(_i8.AppConfigProvider? provider) => super.noSuchMethod( - Invocation.method( - #update, - [provider], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#update, [provider]), + returnValueForMissingStub: null, + ); @override _i9.ApiGateway? loadApiGateway(_i3.Server? server) => - (super.noSuchMethod(Invocation.method( - #loadApiGateway, - [server], - )) as _i9.ApiGateway?); + (super.noSuchMethod(Invocation.method(#loadApiGateway, [server])) + as _i9.ApiGateway?); @override _i7.QueryStatus? getQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #getQueryStatus, - [key], - )) as _i7.QueryStatus?); + (super.noSuchMethod(Invocation.method(#getQueryStatus, [key])) + as _i7.QueryStatus?); @override _i7.QueryStatus? findQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #findQueryStatus, - [key], - )) as _i7.QueryStatus?); + (super.noSuchMethod(Invocation.method(#findQueryStatus, [key])) + as _i7.QueryStatus?); @override - _i10.Future addServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #addServer, - [server], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future addServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#addServer, [server]), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future editServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #editServer, - [server], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future editServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#editServer, [server]), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future removeServer(String? serverAddress) => (super.noSuchMethod( - Invocation.method( - #removeServer, - [serverAddress], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future removeServer(String? serverAddress) => + (super.noSuchMethod( + Invocation.method(#removeServer, [serverAddress]), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future setDefaultServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #setDefaultServer, - [server], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future setDefaultServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#setDefaultServer, [server]), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override _i10.Future saveFromDb(List<_i11.ServerDbData>? servers) => (super.noSuchMethod( - Invocation.method( - #saveFromDb, - [servers], - ), - returnValue: _i10.Future.value(), - ) as _i10.Future); + Invocation.method(#saveFromDb, [servers]), + returnValue: _i10.Future.value(), + ) + as _i10.Future); @override _i10.FutureOr> checkUrlExists(String? url) => (super.noSuchMethod( - Invocation.method( - #checkUrlExists, - [url], - ), - returnValue: - _i10.Future>.value({}), - ) as _i10.FutureOr>); - - @override - void setselectedServer({ - required _i3.Server? server, - bool? toHomeTab, - }) => + Invocation.method(#checkUrlExists, [url]), + returnValue: _i10.Future>.value( + {}, + ), + ) + as _i10.FutureOr>); + + @override + void setselectedServer({required _i3.Server? server, bool? toHomeTab}) => super.noSuchMethod( - Invocation.method( - #setselectedServer, - [], - { - #server: server, - #toHomeTab: toHomeTab, - }, - ), + Invocation.method(#setselectedServer, [], { + #server: server, + #toHomeTab: toHomeTab, + }), returnValueForMissingStub: null, ); @override void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( - Invocation.method( - #updateselectedServerStatus, - [enabled], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#updateselectedServerStatus, [enabled]), + returnValueForMissingStub: null, + ); @override - _i10.Future deleteDbData() => (super.noSuchMethod( - Invocation.method( - #deleteDbData, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future deleteDbData() => + (super.noSuchMethod( + Invocation.method(#deleteDbData, []), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override - _i10.Future resetSelectedServer() => (super.noSuchMethod( - Invocation.method( - #resetSelectedServer, - [], - ), - returnValue: _i10.Future.value(false), - ) as _i10.Future); + _i10.Future resetSelectedServer() => + (super.noSuchMethod( + Invocation.method(#resetSelectedServer, []), + returnValue: _i10.Future.value(false), + ) + as _i10.Future); @override void addListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i12.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [ApiGatewayV6]. @@ -391,13 +288,12 @@ class MockApiGatewayV6 extends _i1.Mock implements _i13.ApiGatewayV6 { } @override - _i3.Server get server => (super.noSuchMethod( - Invocation.getter(#server), - returnValue: _FakeServer_1( - this, - Invocation.getter(#server), - ), - ) as _i3.Server); + _i3.Server get server => + (super.noSuchMethod( + Invocation.getter(#server), + returnValue: _FakeServer_1(this, Invocation.getter(#server)), + ) + as _i3.Server); @override _i10.Future<_i4.Response> httpClient({ @@ -409,121 +305,94 @@ class MockApiGatewayV6 extends _i1.Mock implements _i13.ApiGatewayV6 { int? maxRetries = 1, }) => (super.noSuchMethod( - Invocation.method( - #httpClient, - [], - { - #method: method, - #url: url, - #headers: headers, - #body: body, - #timeout: timeout, - #maxRetries: maxRetries, - }, - ), - returnValue: _i10.Future<_i4.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #httpClient, - [], - { + Invocation.method(#httpClient, [], { #method: method, #url: url, #headers: headers, #body: body, #timeout: timeout, #maxRetries: maxRetries, - }, - ), - )), - ) as _i10.Future<_i4.Response>); + }), + returnValue: _i10.Future<_i4.Response>.value( + _FakeResponse_2( + this, + Invocation.method(#httpClient, [], { + #method: method, + #url: url, + #headers: headers, + #body: body, + #timeout: timeout, + #maxRetries: maxRetries, + }), + ), + ), + ) + as _i10.Future<_i4.Response>); @override _i10.Future<_i5.LoginQueryResponse> loginQuery({bool? refresh = false}) => (super.noSuchMethod( - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - returnValue: - _i10.Future<_i5.LoginQueryResponse>.value(_FakeLoginQueryResponse_3( - this, - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - )), - ) as _i10.Future<_i5.LoginQueryResponse>); + Invocation.method(#loginQuery, [], {#refresh: refresh}), + returnValue: _i10.Future<_i5.LoginQueryResponse>.value( + _FakeLoginQueryResponse_3( + this, + Invocation.method(#loginQuery, [], {#refresh: refresh}), + ), + ), + ) + as _i10.Future<_i5.LoginQueryResponse>); @override _i10.Future<_i5.RealtimeStatusResponse> realtimeStatus() => (super.noSuchMethod( - Invocation.method( - #realtimeStatus, - [], - ), - returnValue: _i10.Future<_i5.RealtimeStatusResponse>.value( - _FakeRealtimeStatusResponse_4( - this, - Invocation.method( - #realtimeStatus, - [], - ), - )), - ) as _i10.Future<_i5.RealtimeStatusResponse>); + Invocation.method(#realtimeStatus, []), + returnValue: _i10.Future<_i5.RealtimeStatusResponse>.value( + _FakeRealtimeStatusResponse_4( + this, + Invocation.method(#realtimeStatus, []), + ), + ), + ) + as _i10.Future<_i5.RealtimeStatusResponse>); @override _i10.Future<_i5.DisableServerResponse> disableServerRequest(int? time) => (super.noSuchMethod( - Invocation.method( - #disableServerRequest, - [time], - ), - returnValue: _i10.Future<_i5.DisableServerResponse>.value( - _FakeDisableServerResponse_5( - this, - Invocation.method( - #disableServerRequest, - [time], - ), - )), - ) as _i10.Future<_i5.DisableServerResponse>); + Invocation.method(#disableServerRequest, [time]), + returnValue: _i10.Future<_i5.DisableServerResponse>.value( + _FakeDisableServerResponse_5( + this, + Invocation.method(#disableServerRequest, [time]), + ), + ), + ) + as _i10.Future<_i5.DisableServerResponse>); @override _i10.Future<_i5.EnableServerResponse> enableServerRequest() => (super.noSuchMethod( - Invocation.method( - #enableServerRequest, - [], - ), - returnValue: _i10.Future<_i5.EnableServerResponse>.value( - _FakeEnableServerResponse_6( - this, - Invocation.method( - #enableServerRequest, - [], - ), - )), - ) as _i10.Future<_i5.EnableServerResponse>); + Invocation.method(#enableServerRequest, []), + returnValue: _i10.Future<_i5.EnableServerResponse>.value( + _FakeEnableServerResponse_6( + this, + Invocation.method(#enableServerRequest, []), + ), + ), + ) + as _i10.Future<_i5.EnableServerResponse>); @override _i10.Future<_i5.FetchOverTimeDataResponse> fetchOverTimeData() => (super.noSuchMethod( - Invocation.method( - #fetchOverTimeData, - [], - ), - returnValue: _i10.Future<_i5.FetchOverTimeDataResponse>.value( - _FakeFetchOverTimeDataResponse_7( - this, - Invocation.method( - #fetchOverTimeData, - [], - ), - )), - ) as _i10.Future<_i5.FetchOverTimeDataResponse>); + Invocation.method(#fetchOverTimeData, []), + returnValue: _i10.Future<_i5.FetchOverTimeDataResponse>.value( + _FakeFetchOverTimeDataResponse_7( + this, + Invocation.method(#fetchOverTimeData, []), + ), + ), + ) + as _i10.Future<_i5.FetchOverTimeDataResponse>); @override _i10.Future<_i5.FetchLogsResponse> fetchLogs( @@ -531,25 +400,15 @@ class MockApiGatewayV6 extends _i1.Mock implements _i13.ApiGatewayV6 { DateTime? until, ) => (super.noSuchMethod( - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - returnValue: - _i10.Future<_i5.FetchLogsResponse>.value(_FakeFetchLogsResponse_8( - this, - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - )), - ) as _i10.Future<_i5.FetchLogsResponse>); + Invocation.method(#fetchLogs, [from, until]), + returnValue: _i10.Future<_i5.FetchLogsResponse>.value( + _FakeFetchLogsResponse_8( + this, + Invocation.method(#fetchLogs, [from, until]), + ), + ), + ) + as _i10.Future<_i5.FetchLogsResponse>); @override _i10.Future<_i5.SetWhiteBlacklistResponse> setWhiteBlacklist( @@ -557,75 +416,56 @@ class MockApiGatewayV6 extends _i1.Mock implements _i13.ApiGatewayV6 { String? list, ) => (super.noSuchMethod( - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - returnValue: _i10.Future<_i5.SetWhiteBlacklistResponse>.value( - _FakeSetWhiteBlacklistResponse_9( - this, - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - )), - ) as _i10.Future<_i5.SetWhiteBlacklistResponse>); - - @override - _i10.Future<_i5.GetDomainLists> getDomainLists() => (super.noSuchMethod( - Invocation.method( - #getDomainLists, - [], - ), - returnValue: - _i10.Future<_i5.GetDomainLists>.value(_FakeGetDomainLists_10( - this, - Invocation.method( - #getDomainLists, - [], - ), - )), - ) as _i10.Future<_i5.GetDomainLists>); + Invocation.method(#setWhiteBlacklist, [domain, list]), + returnValue: _i10.Future<_i5.SetWhiteBlacklistResponse>.value( + _FakeSetWhiteBlacklistResponse_9( + this, + Invocation.method(#setWhiteBlacklist, [domain, list]), + ), + ), + ) + as _i10.Future<_i5.SetWhiteBlacklistResponse>); + + @override + _i10.Future<_i5.GetDomainLists> getDomainLists() => + (super.noSuchMethod( + Invocation.method(#getDomainLists, []), + returnValue: _i10.Future<_i5.GetDomainLists>.value( + _FakeGetDomainLists_10( + this, + Invocation.method(#getDomainLists, []), + ), + ), + ) + as _i10.Future<_i5.GetDomainLists>); @override _i10.Future<_i5.RemoveDomainFromListResponse> removeDomainFromList( - _i14.Domain? domain) => + _i14.Domain? domain, + ) => (super.noSuchMethod( - Invocation.method( - #removeDomainFromList, - [domain], - ), - returnValue: _i10.Future<_i5.RemoveDomainFromListResponse>.value( - _FakeRemoveDomainFromListResponse_11( - this, - Invocation.method( - #removeDomainFromList, - [domain], - ), - )), - ) as _i10.Future<_i5.RemoveDomainFromListResponse>); + Invocation.method(#removeDomainFromList, [domain]), + returnValue: _i10.Future<_i5.RemoveDomainFromListResponse>.value( + _FakeRemoveDomainFromListResponse_11( + this, + Invocation.method(#removeDomainFromList, [domain]), + ), + ), + ) + as _i10.Future<_i5.RemoveDomainFromListResponse>); @override _i10.Future<_i5.AddDomainToListResponse> addDomainToList( - Map? domainData) => + Map? domainData, + ) => (super.noSuchMethod( - Invocation.method( - #addDomainToList, - [domainData], - ), - returnValue: _i10.Future<_i5.AddDomainToListResponse>.value( - _FakeAddDomainToListResponse_12( - this, - Invocation.method( - #addDomainToList, - [domainData], - ), - )), - ) as _i10.Future<_i5.AddDomainToListResponse>); + Invocation.method(#addDomainToList, [domainData]), + returnValue: _i10.Future<_i5.AddDomainToListResponse>.value( + _FakeAddDomainToListResponse_12( + this, + Invocation.method(#addDomainToList, [domainData]), + ), + ), + ) + as _i10.Future<_i5.AddDomainToListResponse>); } diff --git a/test/ut/providers/filters_provider_test.mocks.dart b/test/ut/providers/filters_provider_test.mocks.dart index c927cd51..bcc6500f 100644 --- a/test/ut/providers/filters_provider_test.mocks.dart +++ b/test/ut/providers/filters_provider_test.mocks.dart @@ -30,13 +30,8 @@ import 'package:pi_hole_client/providers/servers_provider.dart' as _i3; // ignore_for_file: subtype_of_sealed_class class _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { - _FakeAppColors_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAppColors_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [ServersProvider]. @@ -48,202 +43,162 @@ class MockServersProvider extends _i1.Mock implements _i3.ServersProvider { } @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); @override - List<_i4.Server> get getServersList => (super.noSuchMethod( - Invocation.getter(#getServersList), - returnValue: <_i4.Server>[], - ) as List<_i4.Server>); + List<_i4.Server> get getServersList => + (super.noSuchMethod( + Invocation.getter(#getServersList), + returnValue: <_i4.Server>[], + ) + as List<_i4.Server>); @override - int get numShown => (super.noSuchMethod( - Invocation.getter(#numShown), - returnValue: 0, - ) as int); + int get numShown => + (super.noSuchMethod(Invocation.getter(#numShown), returnValue: 0) as int); @override - List<_i5.QueryStatus> get queryStatuses => (super.noSuchMethod( - Invocation.getter(#queryStatuses), - returnValue: <_i5.QueryStatus>[], - ) as List<_i5.QueryStatus>); + List<_i5.QueryStatus> get queryStatuses => + (super.noSuchMethod( + Invocation.getter(#queryStatuses), + returnValue: <_i5.QueryStatus>[], + ) + as List<_i5.QueryStatus>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void update(_i6.AppConfigProvider? provider) => super.noSuchMethod( - Invocation.method( - #update, - [provider], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#update, [provider]), + returnValueForMissingStub: null, + ); @override _i7.ApiGateway? loadApiGateway(_i4.Server? server) => - (super.noSuchMethod(Invocation.method( - #loadApiGateway, - [server], - )) as _i7.ApiGateway?); + (super.noSuchMethod(Invocation.method(#loadApiGateway, [server])) + as _i7.ApiGateway?); @override _i5.QueryStatus? getQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #getQueryStatus, - [key], - )) as _i5.QueryStatus?); + (super.noSuchMethod(Invocation.method(#getQueryStatus, [key])) + as _i5.QueryStatus?); @override _i5.QueryStatus? findQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #findQueryStatus, - [key], - )) as _i5.QueryStatus?); + (super.noSuchMethod(Invocation.method(#findQueryStatus, [key])) + as _i5.QueryStatus?); @override - _i8.Future addServer(_i4.Server? server) => (super.noSuchMethod( - Invocation.method( - #addServer, - [server], - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + _i8.Future addServer(_i4.Server? server) => + (super.noSuchMethod( + Invocation.method(#addServer, [server]), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override - _i8.Future editServer(_i4.Server? server) => (super.noSuchMethod( - Invocation.method( - #editServer, - [server], - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + _i8.Future editServer(_i4.Server? server) => + (super.noSuchMethod( + Invocation.method(#editServer, [server]), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override - _i8.Future removeServer(String? serverAddress) => (super.noSuchMethod( - Invocation.method( - #removeServer, - [serverAddress], - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + _i8.Future removeServer(String? serverAddress) => + (super.noSuchMethod( + Invocation.method(#removeServer, [serverAddress]), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override - _i8.Future setDefaultServer(_i4.Server? server) => (super.noSuchMethod( - Invocation.method( - #setDefaultServer, - [server], - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + _i8.Future setDefaultServer(_i4.Server? server) => + (super.noSuchMethod( + Invocation.method(#setDefaultServer, [server]), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override _i8.Future saveFromDb(List<_i9.ServerDbData>? servers) => (super.noSuchMethod( - Invocation.method( - #saveFromDb, - [servers], - ), - returnValue: _i8.Future.value(), - ) as _i8.Future); + Invocation.method(#saveFromDb, [servers]), + returnValue: _i8.Future.value(), + ) + as _i8.Future); @override _i8.FutureOr> checkUrlExists(String? url) => (super.noSuchMethod( - Invocation.method( - #checkUrlExists, - [url], - ), - returnValue: - _i8.Future>.value({}), - ) as _i8.FutureOr>); - - @override - void setselectedServer({ - required _i4.Server? server, - bool? toHomeTab, - }) => + Invocation.method(#checkUrlExists, [url]), + returnValue: _i8.Future>.value( + {}, + ), + ) + as _i8.FutureOr>); + + @override + void setselectedServer({required _i4.Server? server, bool? toHomeTab}) => super.noSuchMethod( - Invocation.method( - #setselectedServer, - [], - { - #server: server, - #toHomeTab: toHomeTab, - }, - ), + Invocation.method(#setselectedServer, [], { + #server: server, + #toHomeTab: toHomeTab, + }), returnValueForMissingStub: null, ); @override void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( - Invocation.method( - #updateselectedServerStatus, - [enabled], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#updateselectedServerStatus, [enabled]), + returnValueForMissingStub: null, + ); @override - _i8.Future deleteDbData() => (super.noSuchMethod( - Invocation.method( - #deleteDbData, - [], - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + _i8.Future deleteDbData() => + (super.noSuchMethod( + Invocation.method(#deleteDbData, []), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override - _i8.Future resetSelectedServer() => (super.noSuchMethod( - Invocation.method( - #resetSelectedServer, - [], - ), - returnValue: _i8.Future.value(false), - ) as _i8.Future); + _i8.Future resetSelectedServer() => + (super.noSuchMethod( + Invocation.method(#resetSelectedServer, []), + returnValue: _i8.Future.value(false), + ) + as _i8.Future); @override void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/ut/providers/servers_provider_test.mocks.dart b/test/ut/providers/servers_provider_test.mocks.dart index b22e8367..4cec8693 100644 --- a/test/ut/providers/servers_provider_test.mocks.dart +++ b/test/ut/providers/servers_provider_test.mocks.dart @@ -34,44 +34,24 @@ import 'package:sqflite/sqflite.dart' as _i3; // ignore_for_file: subtype_of_sealed_class class _FakeAppDbData_0 extends _i1.SmartFake implements _i2.AppDbData { - _FakeAppDbData_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAppDbData_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDatabase_1 extends _i1.SmartFake implements _i3.Database { - _FakeDatabase_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDatabase_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakePiHoleClientData_2 extends _i1.SmartFake implements _i2.PiHoleClientData { - _FakePiHoleClientData_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakePiHoleClientData_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeAppColors_3 extends _i1.SmartFake implements _i4.AppColors { - _FakeAppColors_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAppColors_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [DatabaseRepository]. @@ -84,132 +64,116 @@ class MockDatabaseRepository extends _i1.Mock } @override - List<_i2.ServerDbData> get servers => (super.noSuchMethod( - Invocation.getter(#servers), - returnValue: <_i2.ServerDbData>[], - ) as List<_i2.ServerDbData>); + List<_i2.ServerDbData> get servers => + (super.noSuchMethod( + Invocation.getter(#servers), + returnValue: <_i2.ServerDbData>[], + ) + as List<_i2.ServerDbData>); @override - _i2.AppDbData get appConfig => (super.noSuchMethod( - Invocation.getter(#appConfig), - returnValue: _FakeAppDbData_0( - this, - Invocation.getter(#appConfig), - ), - ) as _i2.AppDbData); + _i2.AppDbData get appConfig => + (super.noSuchMethod( + Invocation.getter(#appConfig), + returnValue: _FakeAppDbData_0(this, Invocation.getter(#appConfig)), + ) + as _i2.AppDbData); @override - _i3.Database get dbInstance => (super.noSuchMethod( - Invocation.getter(#dbInstance), - returnValue: _FakeDatabase_1( - this, - Invocation.getter(#dbInstance), - ), - ) as _i3.Database); + _i3.Database get dbInstance => + (super.noSuchMethod( + Invocation.getter(#dbInstance), + returnValue: _FakeDatabase_1(this, Invocation.getter(#dbInstance)), + ) + as _i3.Database); @override - _i6.Future initialize({String? path}) => (super.noSuchMethod( - Invocation.method( - #initialize, - [], - {#path: path}, - ), - returnValue: _i6.Future.value(), - returnValueForMissingStub: _i6.Future.value(), - ) as _i6.Future); + _i6.Future initialize({String? path}) => + (super.noSuchMethod( + Invocation.method(#initialize, [], {#path: path}), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) + as _i6.Future); @override - Map toDict() => (super.noSuchMethod( - Invocation.method( - #toDict, - [], - ), - returnValue: {}, - ) as Map); + Map toDict() => + (super.noSuchMethod( + Invocation.method(#toDict, []), + returnValue: {}, + ) + as Map); @override _i6.Future<_i2.PiHoleClientData> loadDb({String? path}) => (super.noSuchMethod( - Invocation.method( - #loadDb, - [], - {#path: path}, - ), - returnValue: - _i6.Future<_i2.PiHoleClientData>.value(_FakePiHoleClientData_2( - this, - Invocation.method( - #loadDb, - [], - {#path: path}, - ), - )), - ) as _i6.Future<_i2.PiHoleClientData>); - - @override - _i6.Future closeDb() => (super.noSuchMethod( - Invocation.method( - #closeDb, - [], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); - - @override - _i6.Future saveServerQuery(_i7.Server? server) => (super.noSuchMethod( - Invocation.method( - #saveServerQuery, - [server], - ), - returnValue: _i6.Future.value(), - ) as _i6.Future); - - @override - _i6.Future editServerQuery(_i7.Server? server) => (super.noSuchMethod( - Invocation.method( - #editServerQuery, - [server], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); - - @override - _i6.Future setDefaultServerQuery(String? url) => (super.noSuchMethod( - Invocation.method( - #setDefaultServerQuery, - [url], - ), - returnValue: _i6.Future.value(), - ) as _i6.Future); - - @override - _i6.Future removeServerQuery(String? address) => (super.noSuchMethod( - Invocation.method( - #removeServerQuery, - [address], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); - - @override - _i6.Future deleteServersDataQuery() => (super.noSuchMethod( - Invocation.method( - #deleteServersDataQuery, - [], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + Invocation.method(#loadDb, [], {#path: path}), + returnValue: _i6.Future<_i2.PiHoleClientData>.value( + _FakePiHoleClientData_2( + this, + Invocation.method(#loadDb, [], {#path: path}), + ), + ), + ) + as _i6.Future<_i2.PiHoleClientData>); + + @override + _i6.Future closeDb() => + (super.noSuchMethod( + Invocation.method(#closeDb, []), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); + + @override + _i6.Future saveServerQuery(_i7.Server? server) => + (super.noSuchMethod( + Invocation.method(#saveServerQuery, [server]), + returnValue: _i6.Future.value(), + ) + as _i6.Future); + + @override + _i6.Future editServerQuery(_i7.Server? server) => + (super.noSuchMethod( + Invocation.method(#editServerQuery, [server]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); + + @override + _i6.Future setDefaultServerQuery(String? url) => + (super.noSuchMethod( + Invocation.method(#setDefaultServerQuery, [url]), + returnValue: _i6.Future.value(), + ) + as _i6.Future); + + @override + _i6.Future removeServerQuery(String? address) => + (super.noSuchMethod( + Invocation.method(#removeServerQuery, [address]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); + + @override + _i6.Future deleteServersDataQuery() => + (super.noSuchMethod( + Invocation.method(#deleteServersDataQuery, []), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override _i6.Future> checkUrlExistsQuery(String? url) => (super.noSuchMethod( - Invocation.method( - #checkUrlExistsQuery, - [url], - ), - returnValue: - _i6.Future>.value({}), - ) as _i6.Future>); + Invocation.method(#checkUrlExistsQuery, [url]), + returnValue: _i6.Future>.value( + {}, + ), + ) + as _i6.Future>); @override _i6.Future updateConfigQuery({ @@ -217,25 +181,21 @@ class MockDatabaseRepository extends _i1.Mock required Object? value, }) => (super.noSuchMethod( - Invocation.method( - #updateConfigQuery, - [], - { - #column: column, - #value: value, - }, - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); - - @override - _i6.Future restoreAppConfigQuery() => (super.noSuchMethod( - Invocation.method( - #restoreAppConfigQuery, - [], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + Invocation.method(#updateConfigQuery, [], { + #column: column, + #value: value, + }), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); + + @override + _i6.Future restoreAppConfigQuery() => + (super.noSuchMethod( + Invocation.method(#restoreAppConfigQuery, []), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); } /// A class which mocks [AppConfigProvider]. @@ -247,389 +207,345 @@ class MockAppConfigProvider extends _i1.Mock implements _i8.AppConfigProvider { } @override - _i4.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_3( - this, - Invocation.getter(#colors), - ), - ) as _i4.AppColors); + _i4.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_3(this, Invocation.getter(#colors)), + ) + as _i4.AppColors); @override - bool get showingSnackbar => (super.noSuchMethod( - Invocation.getter(#showingSnackbar), - returnValue: false, - ) as bool); + bool get showingSnackbar => + (super.noSuchMethod( + Invocation.getter(#showingSnackbar), + returnValue: false, + ) + as bool); @override - int get selectedTab => (super.noSuchMethod( - Invocation.getter(#selectedTab), - returnValue: 0, - ) as int); + int get selectedTab => + (super.noSuchMethod(Invocation.getter(#selectedTab), returnValue: 0) + as int); @override - _i9.ThemeMode get selectedTheme => (super.noSuchMethod( - Invocation.getter(#selectedTheme), - returnValue: _i9.ThemeMode.system, - ) as _i9.ThemeMode); + _i9.ThemeMode get selectedTheme => + (super.noSuchMethod( + Invocation.getter(#selectedTheme), + returnValue: _i9.ThemeMode.system, + ) + as _i9.ThemeMode); @override - String get selectedLanguage => (super.noSuchMethod( - Invocation.getter(#selectedLanguage), - returnValue: _i10.dummyValue( - this, - Invocation.getter(#selectedLanguage), - ), - ) as String); + String get selectedLanguage => + (super.noSuchMethod( + Invocation.getter(#selectedLanguage), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#selectedLanguage), + ), + ) + as String); @override - int get selectedThemeNumber => (super.noSuchMethod( - Invocation.getter(#selectedThemeNumber), - returnValue: 0, - ) as int); + int get selectedThemeNumber => + (super.noSuchMethod( + Invocation.getter(#selectedThemeNumber), + returnValue: 0, + ) + as int); @override - int get selectedLanguageNumber => (super.noSuchMethod( - Invocation.getter(#selectedLanguageNumber), - returnValue: 0, - ) as int); + int get selectedLanguageNumber => + (super.noSuchMethod( + Invocation.getter(#selectedLanguageNumber), + returnValue: 0, + ) + as int); @override - bool get overrideSslCheck => (super.noSuchMethod( - Invocation.getter(#overrideSslCheck), - returnValue: false, - ) as bool); + bool get overrideSslCheck => + (super.noSuchMethod( + Invocation.getter(#overrideSslCheck), + returnValue: false, + ) + as bool); @override - bool get reducedDataCharts => (super.noSuchMethod( - Invocation.getter(#reducedDataCharts), - returnValue: false, - ) as bool); + bool get reducedDataCharts => + (super.noSuchMethod( + Invocation.getter(#reducedDataCharts), + returnValue: false, + ) + as bool); @override - double get logsPerQuery => (super.noSuchMethod( - Invocation.getter(#logsPerQuery), - returnValue: 0.0, - ) as double); + double get logsPerQuery => + (super.noSuchMethod(Invocation.getter(#logsPerQuery), returnValue: 0.0) + as double); @override - bool get biometricsSupport => (super.noSuchMethod( - Invocation.getter(#biometricsSupport), - returnValue: false, - ) as bool); + bool get biometricsSupport => + (super.noSuchMethod( + Invocation.getter(#biometricsSupport), + returnValue: false, + ) + as bool); @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); @override - bool get appUnlocked => (super.noSuchMethod( - Invocation.getter(#appUnlocked), - returnValue: false, - ) as bool); + bool get appUnlocked => + (super.noSuchMethod(Invocation.getter(#appUnlocked), returnValue: false) + as bool); @override - bool get validVibrator => (super.noSuchMethod( - Invocation.getter(#validVibrator), - returnValue: false, - ) as bool); + bool get validVibrator => + (super.noSuchMethod(Invocation.getter(#validVibrator), returnValue: false) + as bool); @override - bool get importantInfoReaden => (super.noSuchMethod( - Invocation.getter(#importantInfoReaden), - returnValue: false, - ) as bool); + bool get importantInfoReaden => + (super.noSuchMethod( + Invocation.getter(#importantInfoReaden), + returnValue: false, + ) + as bool); @override - bool get hideZeroValues => (super.noSuchMethod( - Invocation.getter(#hideZeroValues), - returnValue: false, - ) as bool); + bool get hideZeroValues => + (super.noSuchMethod( + Invocation.getter(#hideZeroValues), + returnValue: false, + ) + as bool); @override - int get statisticsVisualizationMode => (super.noSuchMethod( - Invocation.getter(#statisticsVisualizationMode), - returnValue: 0, - ) as int); + int get statisticsVisualizationMode => + (super.noSuchMethod( + Invocation.getter(#statisticsVisualizationMode), + returnValue: 0, + ) + as int); @override - bool get sendCrashReports => (super.noSuchMethod( - Invocation.getter(#sendCrashReports), - returnValue: false, - ) as bool); + bool get sendCrashReports => + (super.noSuchMethod( + Invocation.getter(#sendCrashReports), + returnValue: false, + ) + as bool); @override - List<_i11.AppLog> get logs => (super.noSuchMethod( - Invocation.getter(#logs), - returnValue: <_i11.AppLog>[], - ) as List<_i11.AppLog>); + List<_i11.AppLog> get logs => + (super.noSuchMethod( + Invocation.getter(#logs), + returnValue: <_i11.AppLog>[], + ) + as List<_i11.AppLog>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void setShowingSnackbar(bool? status) => super.noSuchMethod( - Invocation.method( - #setShowingSnackbar, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setShowingSnackbar, [status]), + returnValueForMissingStub: null, + ); @override void setSelectedTab(int? selectedTab) => super.noSuchMethod( - Invocation.method( - #setSelectedTab, - [selectedTab], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setSelectedTab, [selectedTab]), + returnValueForMissingStub: null, + ); @override void setAppInfo(_i12.PackageInfo? appInfo) => super.noSuchMethod( - Invocation.method( - #setAppInfo, - [appInfo], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setAppInfo, [appInfo]), + returnValueForMissingStub: null, + ); @override void setAndroidInfo(_i13.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setAndroidInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setAndroidInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); @override void setIosInfo(_i13.IosDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setIosInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setIosInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); @override void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( - Invocation.method( - #setBiometricsSupport, - [isSupported], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setBiometricsSupport, [isSupported]), + returnValueForMissingStub: null, + ); @override void setAppUnlocked(bool? status) => super.noSuchMethod( - Invocation.method( - #setAppUnlocked, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setAppUnlocked, [status]), + returnValueForMissingStub: null, + ); @override void setValidVibrator(bool? valid) => super.noSuchMethod( - Invocation.method( - #setValidVibrator, - [valid], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setValidVibrator, [valid]), + returnValueForMissingStub: null, + ); @override void addLog(_i11.AppLog? log) => super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addLog, [log]), + returnValueForMissingStub: null, + ); @override - void setSelectedSettingsScreen({ - required int? screen, - bool? notify, - }) => + void setSelectedSettingsScreen({required int? screen, bool? notify}) => super.noSuchMethod( - Invocation.method( - #setSelectedSettingsScreen, - [], - { - #screen: screen, - #notify: notify, - }, - ), + Invocation.method(#setSelectedSettingsScreen, [], { + #screen: screen, + #notify: notify, + }), returnValueForMissingStub: null, ); @override - _i6.Future setUseBiometrics(bool? biometrics) => (super.noSuchMethod( - Invocation.method( - #setUseBiometrics, - [biometrics], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setUseBiometrics(bool? biometrics) => + (super.noSuchMethod( + Invocation.method(#setUseBiometrics, [biometrics]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setImportantInfoReaden(bool? status) => (super.noSuchMethod( - Invocation.method( - #setImportantInfoReaden, - [status], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setImportantInfoReaden(bool? status) => + (super.noSuchMethod( + Invocation.method(#setImportantInfoReaden, [status]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setPassCode(String? code) => (super.noSuchMethod( - Invocation.method( - #setPassCode, - [code], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setPassCode(String? code) => + (super.noSuchMethod( + Invocation.method(#setPassCode, [code]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setAutoRefreshTime(int? seconds) => (super.noSuchMethod( - Invocation.method( - #setAutoRefreshTime, - [seconds], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setAutoRefreshTime(int? seconds) => + (super.noSuchMethod( + Invocation.method(#setAutoRefreshTime, [seconds]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setLogsPerQuery(double? time) => (super.noSuchMethod( - Invocation.method( - #setLogsPerQuery, - [time], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setLogsPerQuery(double? time) => + (super.noSuchMethod( + Invocation.method(#setLogsPerQuery, [time]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setSendCrashReports(bool? status) => (super.noSuchMethod( - Invocation.method( - #setSendCrashReports, - [status], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setSendCrashReports(bool? status) => + (super.noSuchMethod( + Invocation.method(#setSendCrashReports, [status]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override void saveFromDb(_i2.AppDbData? dbData) => super.noSuchMethod( - Invocation.method( - #saveFromDb, - [dbData], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#saveFromDb, [dbData]), + returnValueForMissingStub: null, + ); @override - _i6.Future setOverrideSslCheck(bool? status) => (super.noSuchMethod( - Invocation.method( - #setOverrideSslCheck, - [status], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setOverrideSslCheck(bool? status) => + (super.noSuchMethod( + Invocation.method(#setOverrideSslCheck, [status]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setReducedDataCharts(bool? status) => (super.noSuchMethod( - Invocation.method( - #setReducedDataCharts, - [status], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setReducedDataCharts(bool? status) => + (super.noSuchMethod( + Invocation.method(#setReducedDataCharts, [status]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setHideZeroValues(bool? status) => (super.noSuchMethod( - Invocation.method( - #setHideZeroValues, - [status], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setHideZeroValues(bool? status) => + (super.noSuchMethod( + Invocation.method(#setHideZeroValues, [status]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setSelectedTheme(int? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedTheme, - [value], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setSelectedTheme(int? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedTheme, [value]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future setSelectedLanguage(String? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedLanguage, - [value], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future setSelectedLanguage(String? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedLanguage, [value]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override _i6.Future setStatisticsVisualizationMode(int? value) => (super.noSuchMethod( - Invocation.method( - #setStatisticsVisualizationMode, - [value], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + Invocation.method(#setStatisticsVisualizationMode, [value]), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override - _i6.Future restoreAppConfig() => (super.noSuchMethod( - Invocation.method( - #restoreAppConfig, - [], - ), - returnValue: _i6.Future.value(false), - ) as _i6.Future); + _i6.Future restoreAppConfig() => + (super.noSuchMethod( + Invocation.method(#restoreAppConfig, []), + returnValue: _i6.Future.value(false), + ) + as _i6.Future); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } diff --git a/test/widgets/domains/domains_test.mocks.dart b/test/widgets/domains/domains_test.mocks.dart deleted file mode 100644 index ef077708..00000000 --- a/test/widgets/domains/domains_test.mocks.dart +++ /dev/null @@ -1,1032 +0,0 @@ -// Mocks generated by Mockito 5.4.5 from annotations -// in pi_hole_client/test/widgets/domains/domains_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i12; -import 'dart:ui' as _i14; - -import 'package:device_info_plus/device_info_plus.dart' as _i11; -import 'package:flutter/material.dart' as _i7; -import 'package:http/http.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i8; -import 'package:package_info_plus/package_info_plus.dart' as _i10; -import 'package:pi_hole_client/config/theme.dart' as _i2; -import 'package:pi_hole_client/gateways/api_gateway_interface.dart' as _i17; -import 'package:pi_hole_client/gateways/v6/api_gateway_v6.dart' as _i18; -import 'package:pi_hole_client/models/app_log.dart' as _i9; -import 'package:pi_hole_client/models/domain.dart' as _i19; -import 'package:pi_hole_client/models/gateways.dart' as _i5; -import 'package:pi_hole_client/models/query_status.dart' as _i16; -import 'package:pi_hole_client/models/repository/database.dart' as _i13; -import 'package:pi_hole_client/models/server.dart' as _i3; -import 'package:pi_hole_client/providers/app_config_provider.dart' as _i6; -import 'package:pi_hole_client/providers/servers_provider.dart' as _i15; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable -// 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 _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { - _FakeAppColors_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeServer_1 extends _i1.SmartFake implements _i3.Server { - _FakeServer_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeResponse_2 extends _i1.SmartFake implements _i4.Response { - _FakeResponse_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeLoginQueryResponse_3 extends _i1.SmartFake - implements _i5.LoginQueryResponse { - _FakeLoginQueryResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeRealtimeStatusResponse_4 extends _i1.SmartFake - implements _i5.RealtimeStatusResponse { - _FakeRealtimeStatusResponse_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDisableServerResponse_5 extends _i1.SmartFake - implements _i5.DisableServerResponse { - _FakeDisableServerResponse_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeEnableServerResponse_6 extends _i1.SmartFake - implements _i5.EnableServerResponse { - _FakeEnableServerResponse_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFetchOverTimeDataResponse_7 extends _i1.SmartFake - implements _i5.FetchOverTimeDataResponse { - _FakeFetchOverTimeDataResponse_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFetchLogsResponse_8 extends _i1.SmartFake - implements _i5.FetchLogsResponse { - _FakeFetchLogsResponse_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeSetWhiteBlacklistResponse_9 extends _i1.SmartFake - implements _i5.SetWhiteBlacklistResponse { - _FakeSetWhiteBlacklistResponse_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeGetDomainLists_10 extends _i1.SmartFake - implements _i5.GetDomainLists { - _FakeGetDomainLists_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeRemoveDomainFromListResponse_11 extends _i1.SmartFake - implements _i5.RemoveDomainFromListResponse { - _FakeRemoveDomainFromListResponse_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAddDomainToListResponse_12 extends _i1.SmartFake - implements _i5.AddDomainToListResponse { - _FakeAddDomainToListResponse_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [AppConfigProvider]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockAppConfigProvider extends _i1.Mock implements _i6.AppConfigProvider { - MockAppConfigProvider() { - _i1.throwOnMissingStub(this); - } - - @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); - - @override - bool get showingSnackbar => (super.noSuchMethod( - Invocation.getter(#showingSnackbar), - returnValue: false, - ) as bool); - - @override - int get selectedTab => (super.noSuchMethod( - Invocation.getter(#selectedTab), - returnValue: 0, - ) as int); - - @override - _i7.ThemeMode get selectedTheme => (super.noSuchMethod( - Invocation.getter(#selectedTheme), - returnValue: _i7.ThemeMode.system, - ) as _i7.ThemeMode); - - @override - String get selectedLanguage => (super.noSuchMethod( - Invocation.getter(#selectedLanguage), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#selectedLanguage), - ), - ) as String); - - @override - int get selectedThemeNumber => (super.noSuchMethod( - Invocation.getter(#selectedThemeNumber), - returnValue: 0, - ) as int); - - @override - int get selectedLanguageNumber => (super.noSuchMethod( - Invocation.getter(#selectedLanguageNumber), - returnValue: 0, - ) as int); - - @override - bool get overrideSslCheck => (super.noSuchMethod( - Invocation.getter(#overrideSslCheck), - returnValue: false, - ) as bool); - - @override - bool get reducedDataCharts => (super.noSuchMethod( - Invocation.getter(#reducedDataCharts), - returnValue: false, - ) as bool); - - @override - double get logsPerQuery => (super.noSuchMethod( - Invocation.getter(#logsPerQuery), - returnValue: 0.0, - ) as double); - - @override - bool get biometricsSupport => (super.noSuchMethod( - Invocation.getter(#biometricsSupport), - returnValue: false, - ) as bool); - - @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); - - @override - bool get appUnlocked => (super.noSuchMethod( - Invocation.getter(#appUnlocked), - returnValue: false, - ) as bool); - - @override - bool get validVibrator => (super.noSuchMethod( - Invocation.getter(#validVibrator), - returnValue: false, - ) as bool); - - @override - bool get importantInfoReaden => (super.noSuchMethod( - Invocation.getter(#importantInfoReaden), - returnValue: false, - ) as bool); - - @override - bool get hideZeroValues => (super.noSuchMethod( - Invocation.getter(#hideZeroValues), - returnValue: false, - ) as bool); - - @override - int get statisticsVisualizationMode => (super.noSuchMethod( - Invocation.getter(#statisticsVisualizationMode), - returnValue: 0, - ) as int); - - @override - bool get sendCrashReports => (super.noSuchMethod( - Invocation.getter(#sendCrashReports), - returnValue: false, - ) as bool); - - @override - List<_i9.AppLog> get logs => (super.noSuchMethod( - Invocation.getter(#logs), - returnValue: <_i9.AppLog>[], - ) as List<_i9.AppLog>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void setShowingSnackbar(bool? status) => super.noSuchMethod( - Invocation.method( - #setShowingSnackbar, - [status], - ), - returnValueForMissingStub: null, - ); - - @override - void setSelectedTab(int? selectedTab) => super.noSuchMethod( - Invocation.method( - #setSelectedTab, - [selectedTab], - ), - returnValueForMissingStub: null, - ); - - @override - void setAppInfo(_i10.PackageInfo? appInfo) => super.noSuchMethod( - Invocation.method( - #setAppInfo, - [appInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setAndroidInfo(_i11.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setAndroidInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setIosInfo(_i11.IosDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setIosInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( - Invocation.method( - #setBiometricsSupport, - [isSupported], - ), - returnValueForMissingStub: null, - ); - - @override - void setAppUnlocked(bool? status) => super.noSuchMethod( - Invocation.method( - #setAppUnlocked, - [status], - ), - returnValueForMissingStub: null, - ); - - @override - void setValidVibrator(bool? valid) => super.noSuchMethod( - Invocation.method( - #setValidVibrator, - [valid], - ), - returnValueForMissingStub: null, - ); - - @override - void addLog(_i9.AppLog? log) => super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValueForMissingStub: null, - ); - - @override - void setSelectedSettingsScreen({ - required int? screen, - bool? notify, - }) => - super.noSuchMethod( - Invocation.method( - #setSelectedSettingsScreen, - [], - { - #screen: screen, - #notify: notify, - }, - ), - returnValueForMissingStub: null, - ); - - @override - _i12.Future setUseBiometrics(bool? biometrics) => (super.noSuchMethod( - Invocation.method( - #setUseBiometrics, - [biometrics], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setImportantInfoReaden(bool? status) => (super.noSuchMethod( - Invocation.method( - #setImportantInfoReaden, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setPassCode(String? code) => (super.noSuchMethod( - Invocation.method( - #setPassCode, - [code], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setAutoRefreshTime(int? seconds) => (super.noSuchMethod( - Invocation.method( - #setAutoRefreshTime, - [seconds], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setLogsPerQuery(double? time) => (super.noSuchMethod( - Invocation.method( - #setLogsPerQuery, - [time], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setSendCrashReports(bool? status) => (super.noSuchMethod( - Invocation.method( - #setSendCrashReports, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - void saveFromDb(_i13.AppDbData? dbData) => super.noSuchMethod( - Invocation.method( - #saveFromDb, - [dbData], - ), - returnValueForMissingStub: null, - ); - - @override - _i12.Future setOverrideSslCheck(bool? status) => (super.noSuchMethod( - Invocation.method( - #setOverrideSslCheck, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setReducedDataCharts(bool? status) => (super.noSuchMethod( - Invocation.method( - #setReducedDataCharts, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setHideZeroValues(bool? status) => (super.noSuchMethod( - Invocation.method( - #setHideZeroValues, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setSelectedTheme(int? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedTheme, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setSelectedLanguage(String? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedLanguage, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setStatisticsVisualizationMode(int? value) => - (super.noSuchMethod( - Invocation.method( - #setStatisticsVisualizationMode, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future restoreAppConfig() => (super.noSuchMethod( - Invocation.method( - #restoreAppConfig, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [ServersProvider]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockServersProvider extends _i1.Mock implements _i15.ServersProvider { - MockServersProvider() { - _i1.throwOnMissingStub(this); - } - - @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); - - @override - List<_i3.Server> get getServersList => (super.noSuchMethod( - Invocation.getter(#getServersList), - returnValue: <_i3.Server>[], - ) as List<_i3.Server>); - - @override - int get numShown => (super.noSuchMethod( - Invocation.getter(#numShown), - returnValue: 0, - ) as int); - - @override - List<_i16.QueryStatus> get queryStatuses => (super.noSuchMethod( - Invocation.getter(#queryStatuses), - returnValue: <_i16.QueryStatus>[], - ) as List<_i16.QueryStatus>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void update(_i6.AppConfigProvider? provider) => super.noSuchMethod( - Invocation.method( - #update, - [provider], - ), - returnValueForMissingStub: null, - ); - - @override - _i17.ApiGateway? loadApiGateway(_i3.Server? server) => - (super.noSuchMethod(Invocation.method( - #loadApiGateway, - [server], - )) as _i17.ApiGateway?); - - @override - _i16.QueryStatus? getQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #getQueryStatus, - [key], - )) as _i16.QueryStatus?); - - @override - _i16.QueryStatus? findQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #findQueryStatus, - [key], - )) as _i16.QueryStatus?); - - @override - _i12.Future addServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #addServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future editServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #editServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future removeServer(String? serverAddress) => (super.noSuchMethod( - Invocation.method( - #removeServer, - [serverAddress], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setDefaultServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #setDefaultServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future saveFromDb(List<_i13.ServerDbData>? servers) => - (super.noSuchMethod( - Invocation.method( - #saveFromDb, - [servers], - ), - returnValue: _i12.Future.value(), - ) as _i12.Future); - - @override - _i12.FutureOr> checkUrlExists(String? url) => - (super.noSuchMethod( - Invocation.method( - #checkUrlExists, - [url], - ), - returnValue: - _i12.Future>.value({}), - ) as _i12.FutureOr>); - - @override - void setselectedServer({ - required _i3.Server? server, - bool? toHomeTab, - }) => - super.noSuchMethod( - Invocation.method( - #setselectedServer, - [], - { - #server: server, - #toHomeTab: toHomeTab, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( - Invocation.method( - #updateselectedServerStatus, - [enabled], - ), - returnValueForMissingStub: null, - ); - - @override - _i12.Future deleteDbData() => (super.noSuchMethod( - Invocation.method( - #deleteDbData, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future resetSelectedServer() => (super.noSuchMethod( - Invocation.method( - #resetSelectedServer, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [ApiGatewayV6]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockApiGatewayV6 extends _i1.Mock implements _i18.ApiGatewayV6 { - MockApiGatewayV6() { - _i1.throwOnMissingStub(this); - } - - @override - _i3.Server get server => (super.noSuchMethod( - Invocation.getter(#server), - returnValue: _FakeServer_1( - this, - Invocation.getter(#server), - ), - ) as _i3.Server); - - @override - _i12.Future<_i4.Response> httpClient({ - required String? method, - required String? url, - Map? headers, - Map? body, - int? timeout = 10, - int? maxRetries = 1, - }) => - (super.noSuchMethod( - Invocation.method( - #httpClient, - [], - { - #method: method, - #url: url, - #headers: headers, - #body: body, - #timeout: timeout, - #maxRetries: maxRetries, - }, - ), - returnValue: _i12.Future<_i4.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #httpClient, - [], - { - #method: method, - #url: url, - #headers: headers, - #body: body, - #timeout: timeout, - #maxRetries: maxRetries, - }, - ), - )), - ) as _i12.Future<_i4.Response>); - - @override - _i12.Future<_i5.LoginQueryResponse> loginQuery({bool? refresh = false}) => - (super.noSuchMethod( - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - returnValue: - _i12.Future<_i5.LoginQueryResponse>.value(_FakeLoginQueryResponse_3( - this, - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - )), - ) as _i12.Future<_i5.LoginQueryResponse>); - - @override - _i12.Future<_i5.RealtimeStatusResponse> realtimeStatus() => - (super.noSuchMethod( - Invocation.method( - #realtimeStatus, - [], - ), - returnValue: _i12.Future<_i5.RealtimeStatusResponse>.value( - _FakeRealtimeStatusResponse_4( - this, - Invocation.method( - #realtimeStatus, - [], - ), - )), - ) as _i12.Future<_i5.RealtimeStatusResponse>); - - @override - _i12.Future<_i5.DisableServerResponse> disableServerRequest(int? time) => - (super.noSuchMethod( - Invocation.method( - #disableServerRequest, - [time], - ), - returnValue: _i12.Future<_i5.DisableServerResponse>.value( - _FakeDisableServerResponse_5( - this, - Invocation.method( - #disableServerRequest, - [time], - ), - )), - ) as _i12.Future<_i5.DisableServerResponse>); - - @override - _i12.Future<_i5.EnableServerResponse> enableServerRequest() => - (super.noSuchMethod( - Invocation.method( - #enableServerRequest, - [], - ), - returnValue: _i12.Future<_i5.EnableServerResponse>.value( - _FakeEnableServerResponse_6( - this, - Invocation.method( - #enableServerRequest, - [], - ), - )), - ) as _i12.Future<_i5.EnableServerResponse>); - - @override - _i12.Future<_i5.FetchOverTimeDataResponse> fetchOverTimeData() => - (super.noSuchMethod( - Invocation.method( - #fetchOverTimeData, - [], - ), - returnValue: _i12.Future<_i5.FetchOverTimeDataResponse>.value( - _FakeFetchOverTimeDataResponse_7( - this, - Invocation.method( - #fetchOverTimeData, - [], - ), - )), - ) as _i12.Future<_i5.FetchOverTimeDataResponse>); - - @override - _i12.Future<_i5.FetchLogsResponse> fetchLogs( - DateTime? from, - DateTime? until, - ) => - (super.noSuchMethod( - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - returnValue: - _i12.Future<_i5.FetchLogsResponse>.value(_FakeFetchLogsResponse_8( - this, - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - )), - ) as _i12.Future<_i5.FetchLogsResponse>); - - @override - _i12.Future<_i5.SetWhiteBlacklistResponse> setWhiteBlacklist( - String? domain, - String? list, - ) => - (super.noSuchMethod( - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - returnValue: _i12.Future<_i5.SetWhiteBlacklistResponse>.value( - _FakeSetWhiteBlacklistResponse_9( - this, - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - )), - ) as _i12.Future<_i5.SetWhiteBlacklistResponse>); - - @override - _i12.Future<_i5.GetDomainLists> getDomainLists() => (super.noSuchMethod( - Invocation.method( - #getDomainLists, - [], - ), - returnValue: - _i12.Future<_i5.GetDomainLists>.value(_FakeGetDomainLists_10( - this, - Invocation.method( - #getDomainLists, - [], - ), - )), - ) as _i12.Future<_i5.GetDomainLists>); - - @override - _i12.Future<_i5.RemoveDomainFromListResponse> removeDomainFromList( - _i19.Domain? domain) => - (super.noSuchMethod( - Invocation.method( - #removeDomainFromList, - [domain], - ), - returnValue: _i12.Future<_i5.RemoveDomainFromListResponse>.value( - _FakeRemoveDomainFromListResponse_11( - this, - Invocation.method( - #removeDomainFromList, - [domain], - ), - )), - ) as _i12.Future<_i5.RemoveDomainFromListResponse>); - - @override - _i12.Future<_i5.AddDomainToListResponse> addDomainToList( - Map? domainData) => - (super.noSuchMethod( - Invocation.method( - #addDomainToList, - [domainData], - ), - returnValue: _i12.Future<_i5.AddDomainToListResponse>.value( - _FakeAddDomainToListResponse_12( - this, - Invocation.method( - #addDomainToList, - [domainData], - ), - )), - ) as _i12.Future<_i5.AddDomainToListResponse>); -} diff --git a/test/widgets/helpers.mocks.dart b/test/widgets/helpers.mocks.dart index bfd09a3e..9eaa65e6 100644 --- a/test/widgets/helpers.mocks.dart +++ b/test/widgets/helpers.mocks.dart @@ -47,121 +47,66 @@ import 'package:pi_hole_client/screens/logs/logs_filters_modal.dart' as _i19; // ignore_for_file: subtype_of_sealed_class class _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { - _FakeAppColors_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAppColors_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeServer_1 extends _i1.SmartFake implements _i3.Server { - _FakeServer_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeServer_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeResponse_2 extends _i1.SmartFake implements _i4.Response { - _FakeResponse_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeResponse_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeLoginQueryResponse_3 extends _i1.SmartFake implements _i5.LoginQueryResponse { - _FakeLoginQueryResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeLoginQueryResponse_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRealtimeStatusResponse_4 extends _i1.SmartFake implements _i5.RealtimeStatusResponse { - _FakeRealtimeStatusResponse_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeRealtimeStatusResponse_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeDisableServerResponse_5 extends _i1.SmartFake implements _i5.DisableServerResponse { - _FakeDisableServerResponse_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeDisableServerResponse_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeEnableServerResponse_6 extends _i1.SmartFake implements _i5.EnableServerResponse { - _FakeEnableServerResponse_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeEnableServerResponse_6(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFetchOverTimeDataResponse_7 extends _i1.SmartFake implements _i5.FetchOverTimeDataResponse { - _FakeFetchOverTimeDataResponse_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFetchOverTimeDataResponse_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeFetchLogsResponse_8 extends _i1.SmartFake implements _i5.FetchLogsResponse { - _FakeFetchLogsResponse_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeFetchLogsResponse_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeSetWhiteBlacklistResponse_9 extends _i1.SmartFake implements _i5.SetWhiteBlacklistResponse { - _FakeSetWhiteBlacklistResponse_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeSetWhiteBlacklistResponse_9(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeGetDomainLists_10 extends _i1.SmartFake implements _i5.GetDomainLists { - _FakeGetDomainLists_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeGetDomainLists_10(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } class _FakeRemoveDomainFromListResponse_11 extends _i1.SmartFake @@ -169,21 +114,13 @@ class _FakeRemoveDomainFromListResponse_11 extends _i1.SmartFake _FakeRemoveDomainFromListResponse_11( Object parent, Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + ) : super(parent, parentInvocation); } class _FakeAddDomainToListResponse_12 extends _i1.SmartFake implements _i5.AddDomainToListResponse { - _FakeAddDomainToListResponse_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); + _FakeAddDomainToListResponse_12(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); } /// A class which mocks [AppConfigProvider]. @@ -195,391 +132,344 @@ class MockAppConfigProvider extends _i1.Mock implements _i6.AppConfigProvider { } @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); @override - bool get showingSnackbar => (super.noSuchMethod( - Invocation.getter(#showingSnackbar), - returnValue: false, - ) as bool); + bool get showingSnackbar => + (super.noSuchMethod( + Invocation.getter(#showingSnackbar), + returnValue: false, + ) + as bool); @override - int get selectedTab => (super.noSuchMethod( - Invocation.getter(#selectedTab), - returnValue: 0, - ) as int); + int get selectedTab => + (super.noSuchMethod(Invocation.getter(#selectedTab), returnValue: 0) + as int); @override - _i7.ThemeMode get selectedTheme => (super.noSuchMethod( - Invocation.getter(#selectedTheme), - returnValue: _i7.ThemeMode.system, - ) as _i7.ThemeMode); + _i7.ThemeMode get selectedTheme => + (super.noSuchMethod( + Invocation.getter(#selectedTheme), + returnValue: _i7.ThemeMode.system, + ) + as _i7.ThemeMode); @override - String get selectedLanguage => (super.noSuchMethod( - Invocation.getter(#selectedLanguage), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#selectedLanguage), - ), - ) as String); + String get selectedLanguage => + (super.noSuchMethod( + Invocation.getter(#selectedLanguage), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#selectedLanguage), + ), + ) + as String); @override - int get selectedThemeNumber => (super.noSuchMethod( - Invocation.getter(#selectedThemeNumber), - returnValue: 0, - ) as int); + int get selectedThemeNumber => + (super.noSuchMethod( + Invocation.getter(#selectedThemeNumber), + returnValue: 0, + ) + as int); @override - int get selectedLanguageNumber => (super.noSuchMethod( - Invocation.getter(#selectedLanguageNumber), - returnValue: 0, - ) as int); + int get selectedLanguageNumber => + (super.noSuchMethod( + Invocation.getter(#selectedLanguageNumber), + returnValue: 0, + ) + as int); @override - bool get overrideSslCheck => (super.noSuchMethod( - Invocation.getter(#overrideSslCheck), - returnValue: false, - ) as bool); + bool get overrideSslCheck => + (super.noSuchMethod( + Invocation.getter(#overrideSslCheck), + returnValue: false, + ) + as bool); @override - bool get reducedDataCharts => (super.noSuchMethod( - Invocation.getter(#reducedDataCharts), - returnValue: false, - ) as bool); + bool get reducedDataCharts => + (super.noSuchMethod( + Invocation.getter(#reducedDataCharts), + returnValue: false, + ) + as bool); @override - double get logsPerQuery => (super.noSuchMethod( - Invocation.getter(#logsPerQuery), - returnValue: 0.0, - ) as double); + double get logsPerQuery => + (super.noSuchMethod(Invocation.getter(#logsPerQuery), returnValue: 0.0) + as double); @override - bool get biometricsSupport => (super.noSuchMethod( - Invocation.getter(#biometricsSupport), - returnValue: false, - ) as bool); + bool get biometricsSupport => + (super.noSuchMethod( + Invocation.getter(#biometricsSupport), + returnValue: false, + ) + as bool); @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); @override - bool get appUnlocked => (super.noSuchMethod( - Invocation.getter(#appUnlocked), - returnValue: false, - ) as bool); + bool get appUnlocked => + (super.noSuchMethod(Invocation.getter(#appUnlocked), returnValue: false) + as bool); @override - bool get validVibrator => (super.noSuchMethod( - Invocation.getter(#validVibrator), - returnValue: false, - ) as bool); + bool get validVibrator => + (super.noSuchMethod(Invocation.getter(#validVibrator), returnValue: false) + as bool); @override - bool get importantInfoReaden => (super.noSuchMethod( - Invocation.getter(#importantInfoReaden), - returnValue: false, - ) as bool); + bool get importantInfoReaden => + (super.noSuchMethod( + Invocation.getter(#importantInfoReaden), + returnValue: false, + ) + as bool); @override - bool get hideZeroValues => (super.noSuchMethod( - Invocation.getter(#hideZeroValues), - returnValue: false, - ) as bool); + bool get hideZeroValues => + (super.noSuchMethod( + Invocation.getter(#hideZeroValues), + returnValue: false, + ) + as bool); @override - int get statisticsVisualizationMode => (super.noSuchMethod( - Invocation.getter(#statisticsVisualizationMode), - returnValue: 0, - ) as int); + int get statisticsVisualizationMode => + (super.noSuchMethod( + Invocation.getter(#statisticsVisualizationMode), + returnValue: 0, + ) + as int); @override - bool get sendCrashReports => (super.noSuchMethod( - Invocation.getter(#sendCrashReports), - returnValue: false, - ) as bool); + bool get sendCrashReports => + (super.noSuchMethod( + Invocation.getter(#sendCrashReports), + returnValue: false, + ) + as bool); @override - List<_i9.AppLog> get logs => (super.noSuchMethod( - Invocation.getter(#logs), - returnValue: <_i9.AppLog>[], - ) as List<_i9.AppLog>); + List<_i9.AppLog> get logs => + (super.noSuchMethod(Invocation.getter(#logs), returnValue: <_i9.AppLog>[]) + as List<_i9.AppLog>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void setShowingSnackbar(bool? status) => super.noSuchMethod( - Invocation.method( - #setShowingSnackbar, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setShowingSnackbar, [status]), + returnValueForMissingStub: null, + ); @override void setSelectedTab(int? selectedTab) => super.noSuchMethod( - Invocation.method( - #setSelectedTab, - [selectedTab], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setSelectedTab, [selectedTab]), + returnValueForMissingStub: null, + ); @override void setAppInfo(_i10.PackageInfo? appInfo) => super.noSuchMethod( - Invocation.method( - #setAppInfo, - [appInfo], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setAppInfo, [appInfo]), + returnValueForMissingStub: null, + ); @override void setAndroidInfo(_i11.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setAndroidInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setAndroidInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); @override void setIosInfo(_i11.IosDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setIosInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setIosInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); @override void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( - Invocation.method( - #setBiometricsSupport, - [isSupported], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setBiometricsSupport, [isSupported]), + returnValueForMissingStub: null, + ); @override void setAppUnlocked(bool? status) => super.noSuchMethod( - Invocation.method( - #setAppUnlocked, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setAppUnlocked, [status]), + returnValueForMissingStub: null, + ); @override void setValidVibrator(bool? valid) => super.noSuchMethod( - Invocation.method( - #setValidVibrator, - [valid], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setValidVibrator, [valid]), + returnValueForMissingStub: null, + ); @override void addLog(_i9.AppLog? log) => super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addLog, [log]), + returnValueForMissingStub: null, + ); @override - void setSelectedSettingsScreen({ - required int? screen, - bool? notify, - }) => + void setSelectedSettingsScreen({required int? screen, bool? notify}) => super.noSuchMethod( - Invocation.method( - #setSelectedSettingsScreen, - [], - { - #screen: screen, - #notify: notify, - }, - ), + Invocation.method(#setSelectedSettingsScreen, [], { + #screen: screen, + #notify: notify, + }), returnValueForMissingStub: null, ); @override - _i12.Future setUseBiometrics(bool? biometrics) => (super.noSuchMethod( - Invocation.method( - #setUseBiometrics, - [biometrics], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setUseBiometrics(bool? biometrics) => + (super.noSuchMethod( + Invocation.method(#setUseBiometrics, [biometrics]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setImportantInfoReaden(bool? status) => (super.noSuchMethod( - Invocation.method( - #setImportantInfoReaden, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setImportantInfoReaden(bool? status) => + (super.noSuchMethod( + Invocation.method(#setImportantInfoReaden, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setPassCode(String? code) => (super.noSuchMethod( - Invocation.method( - #setPassCode, - [code], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setPassCode(String? code) => + (super.noSuchMethod( + Invocation.method(#setPassCode, [code]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setAutoRefreshTime(int? seconds) => (super.noSuchMethod( - Invocation.method( - #setAutoRefreshTime, - [seconds], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setAutoRefreshTime(int? seconds) => + (super.noSuchMethod( + Invocation.method(#setAutoRefreshTime, [seconds]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setLogsPerQuery(double? time) => (super.noSuchMethod( - Invocation.method( - #setLogsPerQuery, - [time], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setLogsPerQuery(double? time) => + (super.noSuchMethod( + Invocation.method(#setLogsPerQuery, [time]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setSendCrashReports(bool? status) => (super.noSuchMethod( - Invocation.method( - #setSendCrashReports, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setSendCrashReports(bool? status) => + (super.noSuchMethod( + Invocation.method(#setSendCrashReports, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override void saveFromDb(_i13.AppDbData? dbData) => super.noSuchMethod( - Invocation.method( - #saveFromDb, - [dbData], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#saveFromDb, [dbData]), + returnValueForMissingStub: null, + ); @override - _i12.Future setOverrideSslCheck(bool? status) => (super.noSuchMethod( - Invocation.method( - #setOverrideSslCheck, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setOverrideSslCheck(bool? status) => + (super.noSuchMethod( + Invocation.method(#setOverrideSslCheck, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setReducedDataCharts(bool? status) => (super.noSuchMethod( - Invocation.method( - #setReducedDataCharts, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setReducedDataCharts(bool? status) => + (super.noSuchMethod( + Invocation.method(#setReducedDataCharts, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setHideZeroValues(bool? status) => (super.noSuchMethod( - Invocation.method( - #setHideZeroValues, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setHideZeroValues(bool? status) => + (super.noSuchMethod( + Invocation.method(#setHideZeroValues, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setSelectedTheme(int? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedTheme, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setSelectedTheme(int? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedTheme, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setSelectedLanguage(String? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedLanguage, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setSelectedLanguage(String? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedLanguage, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override _i12.Future setStatisticsVisualizationMode(int? value) => (super.noSuchMethod( - Invocation.method( - #setStatisticsVisualizationMode, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + Invocation.method(#setStatisticsVisualizationMode, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future restoreAppConfig() => (super.noSuchMethod( - Invocation.method( - #restoreAppConfig, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future restoreAppConfig() => + (super.noSuchMethod( + Invocation.method(#restoreAppConfig, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [ServersProvider]. @@ -591,204 +481,164 @@ class MockServersProvider extends _i1.Mock implements _i15.ServersProvider { } @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); @override - List<_i3.Server> get getServersList => (super.noSuchMethod( - Invocation.getter(#getServersList), - returnValue: <_i3.Server>[], - ) as List<_i3.Server>); + List<_i3.Server> get getServersList => + (super.noSuchMethod( + Invocation.getter(#getServersList), + returnValue: <_i3.Server>[], + ) + as List<_i3.Server>); @override - int get numShown => (super.noSuchMethod( - Invocation.getter(#numShown), - returnValue: 0, - ) as int); + int get numShown => + (super.noSuchMethod(Invocation.getter(#numShown), returnValue: 0) as int); @override - List<_i16.QueryStatus> get queryStatuses => (super.noSuchMethod( - Invocation.getter(#queryStatuses), - returnValue: <_i16.QueryStatus>[], - ) as List<_i16.QueryStatus>); + List<_i16.QueryStatus> get queryStatuses => + (super.noSuchMethod( + Invocation.getter(#queryStatuses), + returnValue: <_i16.QueryStatus>[], + ) + as List<_i16.QueryStatus>); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void update(_i6.AppConfigProvider? provider) => super.noSuchMethod( - Invocation.method( - #update, - [provider], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#update, [provider]), + returnValueForMissingStub: null, + ); @override _i17.ApiGateway? loadApiGateway(_i3.Server? server) => - (super.noSuchMethod(Invocation.method( - #loadApiGateway, - [server], - )) as _i17.ApiGateway?); + (super.noSuchMethod(Invocation.method(#loadApiGateway, [server])) + as _i17.ApiGateway?); @override _i16.QueryStatus? getQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #getQueryStatus, - [key], - )) as _i16.QueryStatus?); + (super.noSuchMethod(Invocation.method(#getQueryStatus, [key])) + as _i16.QueryStatus?); @override _i16.QueryStatus? findQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #findQueryStatus, - [key], - )) as _i16.QueryStatus?); + (super.noSuchMethod(Invocation.method(#findQueryStatus, [key])) + as _i16.QueryStatus?); @override - _i12.Future addServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #addServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future addServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#addServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future editServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #editServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future editServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#editServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future removeServer(String? serverAddress) => (super.noSuchMethod( - Invocation.method( - #removeServer, - [serverAddress], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future removeServer(String? serverAddress) => + (super.noSuchMethod( + Invocation.method(#removeServer, [serverAddress]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future setDefaultServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #setDefaultServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future setDefaultServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#setDefaultServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override _i12.Future saveFromDb(List<_i13.ServerDbData>? servers) => (super.noSuchMethod( - Invocation.method( - #saveFromDb, - [servers], - ), - returnValue: _i12.Future.value(), - ) as _i12.Future); + Invocation.method(#saveFromDb, [servers]), + returnValue: _i12.Future.value(), + ) + as _i12.Future); @override _i12.FutureOr> checkUrlExists(String? url) => (super.noSuchMethod( - Invocation.method( - #checkUrlExists, - [url], - ), - returnValue: - _i12.Future>.value({}), - ) as _i12.FutureOr>); + Invocation.method(#checkUrlExists, [url]), + returnValue: _i12.Future>.value( + {}, + ), + ) + as _i12.FutureOr>); @override - void setselectedServer({ - required _i3.Server? server, - bool? toHomeTab, - }) => + void setselectedServer({required _i3.Server? server, bool? toHomeTab}) => super.noSuchMethod( - Invocation.method( - #setselectedServer, - [], - { - #server: server, - #toHomeTab: toHomeTab, - }, - ), + Invocation.method(#setselectedServer, [], { + #server: server, + #toHomeTab: toHomeTab, + }), returnValueForMissingStub: null, ); @override void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( - Invocation.method( - #updateselectedServerStatus, - [enabled], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#updateselectedServerStatus, [enabled]), + returnValueForMissingStub: null, + ); @override - _i12.Future deleteDbData() => (super.noSuchMethod( - Invocation.method( - #deleteDbData, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future deleteDbData() => + (super.noSuchMethod( + Invocation.method(#deleteDbData, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override - _i12.Future resetSelectedServer() => (super.noSuchMethod( - Invocation.method( - #resetSelectedServer, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); + _i12.Future resetSelectedServer() => + (super.noSuchMethod( + Invocation.method(#resetSelectedServer, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [FiltersProvider]. @@ -800,199 +650,164 @@ class MockFiltersProvider extends _i1.Mock implements _i18.FiltersProvider { } @override - List get statusAllowedAndRetried => (super.noSuchMethod( - Invocation.getter(#statusAllowedAndRetried), - returnValue: [], - ) as List); + List get statusAllowedAndRetried => + (super.noSuchMethod( + Invocation.getter(#statusAllowedAndRetried), + returnValue: [], + ) + as List); @override - List get defaultSelected => (super.noSuchMethod( - Invocation.getter(#defaultSelected), - returnValue: [], - ) as List); + List get defaultSelected => + (super.noSuchMethod( + Invocation.getter(#defaultSelected), + returnValue: [], + ) + as List); @override - List get statusSelected => (super.noSuchMethod( - Invocation.getter(#statusSelected), - returnValue: [], - ) as List); + List get statusSelected => + (super.noSuchMethod( + Invocation.getter(#statusSelected), + returnValue: [], + ) + as List); @override - String get statusSelectedString => (super.noSuchMethod( - Invocation.getter(#statusSelectedString), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#statusSelectedString), - ), - ) as String); + String get statusSelectedString => + (super.noSuchMethod( + Invocation.getter(#statusSelectedString), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#statusSelectedString), + ), + ) + as String); @override - List get totalClients => (super.noSuchMethod( - Invocation.getter(#totalClients), - returnValue: [], - ) as List); + List get totalClients => + (super.noSuchMethod( + Invocation.getter(#totalClients), + returnValue: [], + ) + as List); @override - List get selectedClients => (super.noSuchMethod( - Invocation.getter(#selectedClients), - returnValue: [], - ) as List); + List get selectedClients => + (super.noSuchMethod( + Invocation.getter(#selectedClients), + returnValue: [], + ) + as List); @override - _i19.RequestStatus get requestStatus => (super.noSuchMethod( - Invocation.getter(#requestStatus), - returnValue: _i19.RequestStatus.all, - ) as _i19.RequestStatus); + _i19.RequestStatus get requestStatus => + (super.noSuchMethod( + Invocation.getter(#requestStatus), + returnValue: _i19.RequestStatus.all, + ) + as _i19.RequestStatus); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void update(_i15.ServersProvider? provider) => super.noSuchMethod( - Invocation.method( - #update, - [provider], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#update, [provider]), + returnValueForMissingStub: null, + ); @override void setStatusSelected(List? values) => super.noSuchMethod( - Invocation.method( - #setStatusSelected, - [values], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setStatusSelected, [values]), + returnValueForMissingStub: null, + ); @override void setStartTime(DateTime? value) => super.noSuchMethod( - Invocation.method( - #setStartTime, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setStartTime, [value]), + returnValueForMissingStub: null, + ); @override void setEndTime(DateTime? value) => super.noSuchMethod( - Invocation.method( - #setEndTime, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setEndTime, [value]), + returnValueForMissingStub: null, + ); @override void resetFilters() => super.noSuchMethod( - Invocation.method( - #resetFilters, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#resetFilters, []), + returnValueForMissingStub: null, + ); @override void resetTime() => super.noSuchMethod( - Invocation.method( - #resetTime, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#resetTime, []), + returnValueForMissingStub: null, + ); @override void resetStatus() => super.noSuchMethod( - Invocation.method( - #resetStatus, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#resetStatus, []), + returnValueForMissingStub: null, + ); @override void setClients(List? clients) => super.noSuchMethod( - Invocation.method( - #setClients, - [clients], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setClients, [clients]), + returnValueForMissingStub: null, + ); @override void setSelectedClients(List? selectedClients) => super.noSuchMethod( - Invocation.method( - #setSelectedClients, - [selectedClients], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setSelectedClients, [selectedClients]), + returnValueForMissingStub: null, + ); @override void setSelectedDomain(String? domain) => super.noSuchMethod( - Invocation.method( - #setSelectedDomain, - [domain], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setSelectedDomain, [domain]), + returnValueForMissingStub: null, + ); @override void resetClients() => super.noSuchMethod( - Invocation.method( - #resetClients, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#resetClients, []), + returnValueForMissingStub: null, + ); @override void setRequestStatus(_i19.RequestStatus? status) => super.noSuchMethod( - Invocation.method( - #setRequestStatus, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setRequestStatus, [status]), + returnValueForMissingStub: null, + ); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [StatusProvider]. @@ -1004,140 +819,116 @@ class MockStatusProvider extends _i1.Mock implements _i20.StatusProvider { } @override - bool get isServerConnected => (super.noSuchMethod( - Invocation.getter(#isServerConnected), - returnValue: false, - ) as bool); + bool get isServerConnected => + (super.noSuchMethod( + Invocation.getter(#isServerConnected), + returnValue: false, + ) + as bool); @override - _i21.LoadStatus get getStatusLoading => (super.noSuchMethod( - Invocation.getter(#getStatusLoading), - returnValue: _i21.LoadStatus.loading, - ) as _i21.LoadStatus); + _i21.LoadStatus get getStatusLoading => + (super.noSuchMethod( + Invocation.getter(#getStatusLoading), + returnValue: _i21.LoadStatus.loading, + ) + as _i21.LoadStatus); @override - int get getOvertimeDataLoadStatus => (super.noSuchMethod( - Invocation.getter(#getOvertimeDataLoadStatus), - returnValue: 0, - ) as int); + int get getOvertimeDataLoadStatus => + (super.noSuchMethod( + Invocation.getter(#getOvertimeDataLoadStatus), + returnValue: 0, + ) + as int); @override - bool get getRefreshServerStatus => (super.noSuchMethod( - Invocation.getter(#getRefreshServerStatus), - returnValue: false, - ) as bool); + bool get getRefreshServerStatus => + (super.noSuchMethod( + Invocation.getter(#getRefreshServerStatus), + returnValue: false, + ) + as bool); @override - bool get startAutoRefresh => (super.noSuchMethod( - Invocation.getter(#startAutoRefresh), - returnValue: false, - ) as bool); + bool get startAutoRefresh => + (super.noSuchMethod( + Invocation.getter(#startAutoRefresh), + returnValue: false, + ) + as bool); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void setIsServerConnected(bool? value) => super.noSuchMethod( - Invocation.method( - #setIsServerConnected, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setIsServerConnected, [value]), + returnValueForMissingStub: null, + ); @override void setStartAutoRefresh(bool? value) => super.noSuchMethod( - Invocation.method( - #setStartAutoRefresh, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setStartAutoRefresh, [value]), + returnValueForMissingStub: null, + ); @override void setRefreshServerStatus(bool? status) => super.noSuchMethod( - Invocation.method( - #setRefreshServerStatus, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setRefreshServerStatus, [status]), + returnValueForMissingStub: null, + ); @override void setStatusLoading(_i21.LoadStatus? status) => super.noSuchMethod( - Invocation.method( - #setStatusLoading, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setStatusLoading, [status]), + returnValueForMissingStub: null, + ); @override void setRealtimeStatus(_i22.RealtimeStatus? realtimeStatus) => super.noSuchMethod( - Invocation.method( - #setRealtimeStatus, - [realtimeStatus], - ), + Invocation.method(#setRealtimeStatus, [realtimeStatus]), returnValueForMissingStub: null, ); @override void setOvertimeDataLoadingStatus(int? status) => super.noSuchMethod( - Invocation.method( - #setOvertimeDataLoadingStatus, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setOvertimeDataLoadingStatus, [status]), + returnValueForMissingStub: null, + ); @override void setOvertimeData(_i23.OverTimeData? value) => super.noSuchMethod( - Invocation.method( - #setOvertimeData, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setOvertimeData, [value]), + returnValueForMissingStub: null, + ); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [DomainsListProvider]. @@ -1152,181 +943,150 @@ class MockDomainsListProvider extends _i1.Mock @override set serversProvider(_i15.ServersProvider? _serversProvider) => super.noSuchMethod( - Invocation.setter( - #serversProvider, - _serversProvider, - ), + Invocation.setter(#serversProvider, _serversProvider), returnValueForMissingStub: null, ); @override - _i21.LoadStatus get loadingStatus => (super.noSuchMethod( - Invocation.getter(#loadingStatus), - returnValue: _i21.LoadStatus.loading, - ) as _i21.LoadStatus); + _i21.LoadStatus get loadingStatus => + (super.noSuchMethod( + Invocation.getter(#loadingStatus), + returnValue: _i21.LoadStatus.loading, + ) + as _i21.LoadStatus); @override - List<_i25.Domain> get whitelistDomains => (super.noSuchMethod( - Invocation.getter(#whitelistDomains), - returnValue: <_i25.Domain>[], - ) as List<_i25.Domain>); + List<_i25.Domain> get whitelistDomains => + (super.noSuchMethod( + Invocation.getter(#whitelistDomains), + returnValue: <_i25.Domain>[], + ) + as List<_i25.Domain>); @override - List<_i25.Domain> get blacklistDomains => (super.noSuchMethod( - Invocation.getter(#blacklistDomains), - returnValue: <_i25.Domain>[], - ) as List<_i25.Domain>); + List<_i25.Domain> get blacklistDomains => + (super.noSuchMethod( + Invocation.getter(#blacklistDomains), + returnValue: <_i25.Domain>[], + ) + as List<_i25.Domain>); @override - List<_i25.Domain> get filteredWhitelistDomains => (super.noSuchMethod( - Invocation.getter(#filteredWhitelistDomains), - returnValue: <_i25.Domain>[], - ) as List<_i25.Domain>); + List<_i25.Domain> get filteredWhitelistDomains => + (super.noSuchMethod( + Invocation.getter(#filteredWhitelistDomains), + returnValue: <_i25.Domain>[], + ) + as List<_i25.Domain>); @override - List<_i25.Domain> get filteredBlacklistDomains => (super.noSuchMethod( - Invocation.getter(#filteredBlacklistDomains), - returnValue: <_i25.Domain>[], - ) as List<_i25.Domain>); + List<_i25.Domain> get filteredBlacklistDomains => + (super.noSuchMethod( + Invocation.getter(#filteredBlacklistDomains), + returnValue: <_i25.Domain>[], + ) + as List<_i25.Domain>); @override - String get searchTerm => (super.noSuchMethod( - Invocation.getter(#searchTerm), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#searchTerm), - ), - ) as String); + String get searchTerm => + (super.noSuchMethod( + Invocation.getter(#searchTerm), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#searchTerm), + ), + ) + as String); @override - bool get searchMode => (super.noSuchMethod( - Invocation.getter(#searchMode), - returnValue: false, - ) as bool); + bool get searchMode => + (super.noSuchMethod(Invocation.getter(#searchMode), returnValue: false) + as bool); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); @override void update(_i15.ServersProvider? provider) => super.noSuchMethod( - Invocation.method( - #update, - [provider], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#update, [provider]), + returnValueForMissingStub: null, + ); @override void setLoadingStatus(_i21.LoadStatus? status) => super.noSuchMethod( - Invocation.method( - #setLoadingStatus, - [status], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setLoadingStatus, [status]), + returnValueForMissingStub: null, + ); @override void setWhitelistDomains(List<_i25.Domain>? domains) => super.noSuchMethod( - Invocation.method( - #setWhitelistDomains, - [domains], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setWhitelistDomains, [domains]), + returnValueForMissingStub: null, + ); @override void setBlacklistDomains(List<_i25.Domain>? domains) => super.noSuchMethod( - Invocation.method( - #setBlacklistDomains, - [domains], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setBlacklistDomains, [domains]), + returnValueForMissingStub: null, + ); @override void setSelectedTab(int? tab) => super.noSuchMethod( - Invocation.method( - #setSelectedTab, - [tab], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setSelectedTab, [tab]), + returnValueForMissingStub: null, + ); @override void setSearchMode(bool? value) => super.noSuchMethod( - Invocation.method( - #setSearchMode, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#setSearchMode, [value]), + returnValueForMissingStub: null, + ); @override void onSearch(String? value) => super.noSuchMethod( - Invocation.method( - #onSearch, - [value], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#onSearch, [value]), + returnValueForMissingStub: null, + ); @override _i12.Future fetchDomainsList(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #fetchDomainsList, - [server], - ), - returnValue: _i12.Future.value(), - ) as _i12.Future); + Invocation.method(#fetchDomainsList, [server]), + returnValue: _i12.Future.value(), + ) + as _i12.Future); @override void removeDomainFromList(_i25.Domain? domain) => super.noSuchMethod( - Invocation.method( - #removeDomainFromList, - [domain], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeDomainFromList, [domain]), + returnValueForMissingStub: null, + ); @override void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); @override void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); @override void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); @override void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); } /// A class which mocks [ApiGatewayV5]. @@ -1338,29 +1098,20 @@ class MockApiGatewayV5 extends _i1.Mock implements _i26.ApiGatewayV5 { } @override - _i3.Server get server => (super.noSuchMethod( - Invocation.getter(#server), - returnValue: _FakeServer_1( - this, - Invocation.getter(#server), - ), - ) as _i3.Server); + _i3.Server get server => + (super.noSuchMethod( + Invocation.getter(#server), + returnValue: _FakeServer_1(this, Invocation.getter(#server)), + ) + as _i3.Server); @override - bool checkBasicAuth( - String? username, - String? password, - ) => + bool checkBasicAuth(String? username, String? password) => (super.noSuchMethod( - Invocation.method( - #checkBasicAuth, - [ - username, - password, - ], - ), - returnValue: false, - ) as bool); + Invocation.method(#checkBasicAuth, [username, password]), + returnValue: false, + ) + as bool); @override _i12.Future<_i4.Response> httpClient({ @@ -1372,121 +1123,94 @@ class MockApiGatewayV5 extends _i1.Mock implements _i26.ApiGatewayV5 { Map? basicAuth, }) => (super.noSuchMethod( - Invocation.method( - #httpClient, - [], - { - #method: method, - #url: url, - #headers: headers, - #body: body, - #timeout: timeout, - #basicAuth: basicAuth, - }, - ), - returnValue: _i12.Future<_i4.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #httpClient, - [], - { + Invocation.method(#httpClient, [], { #method: method, #url: url, #headers: headers, #body: body, #timeout: timeout, #basicAuth: basicAuth, - }, - ), - )), - ) as _i12.Future<_i4.Response>); + }), + returnValue: _i12.Future<_i4.Response>.value( + _FakeResponse_2( + this, + Invocation.method(#httpClient, [], { + #method: method, + #url: url, + #headers: headers, + #body: body, + #timeout: timeout, + #basicAuth: basicAuth, + }), + ), + ), + ) + as _i12.Future<_i4.Response>); @override _i12.Future<_i5.LoginQueryResponse> loginQuery({bool? refresh = false}) => (super.noSuchMethod( - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - returnValue: - _i12.Future<_i5.LoginQueryResponse>.value(_FakeLoginQueryResponse_3( - this, - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - )), - ) as _i12.Future<_i5.LoginQueryResponse>); + Invocation.method(#loginQuery, [], {#refresh: refresh}), + returnValue: _i12.Future<_i5.LoginQueryResponse>.value( + _FakeLoginQueryResponse_3( + this, + Invocation.method(#loginQuery, [], {#refresh: refresh}), + ), + ), + ) + as _i12.Future<_i5.LoginQueryResponse>); @override _i12.Future<_i5.RealtimeStatusResponse> realtimeStatus() => (super.noSuchMethod( - Invocation.method( - #realtimeStatus, - [], - ), - returnValue: _i12.Future<_i5.RealtimeStatusResponse>.value( - _FakeRealtimeStatusResponse_4( - this, - Invocation.method( - #realtimeStatus, - [], - ), - )), - ) as _i12.Future<_i5.RealtimeStatusResponse>); + Invocation.method(#realtimeStatus, []), + returnValue: _i12.Future<_i5.RealtimeStatusResponse>.value( + _FakeRealtimeStatusResponse_4( + this, + Invocation.method(#realtimeStatus, []), + ), + ), + ) + as _i12.Future<_i5.RealtimeStatusResponse>); @override _i12.Future<_i5.DisableServerResponse> disableServerRequest(int? time) => (super.noSuchMethod( - Invocation.method( - #disableServerRequest, - [time], - ), - returnValue: _i12.Future<_i5.DisableServerResponse>.value( - _FakeDisableServerResponse_5( - this, - Invocation.method( - #disableServerRequest, - [time], - ), - )), - ) as _i12.Future<_i5.DisableServerResponse>); + Invocation.method(#disableServerRequest, [time]), + returnValue: _i12.Future<_i5.DisableServerResponse>.value( + _FakeDisableServerResponse_5( + this, + Invocation.method(#disableServerRequest, [time]), + ), + ), + ) + as _i12.Future<_i5.DisableServerResponse>); @override _i12.Future<_i5.EnableServerResponse> enableServerRequest() => (super.noSuchMethod( - Invocation.method( - #enableServerRequest, - [], - ), - returnValue: _i12.Future<_i5.EnableServerResponse>.value( - _FakeEnableServerResponse_6( - this, - Invocation.method( - #enableServerRequest, - [], - ), - )), - ) as _i12.Future<_i5.EnableServerResponse>); + Invocation.method(#enableServerRequest, []), + returnValue: _i12.Future<_i5.EnableServerResponse>.value( + _FakeEnableServerResponse_6( + this, + Invocation.method(#enableServerRequest, []), + ), + ), + ) + as _i12.Future<_i5.EnableServerResponse>); @override _i12.Future<_i5.FetchOverTimeDataResponse> fetchOverTimeData() => (super.noSuchMethod( - Invocation.method( - #fetchOverTimeData, - [], - ), - returnValue: _i12.Future<_i5.FetchOverTimeDataResponse>.value( - _FakeFetchOverTimeDataResponse_7( - this, - Invocation.method( - #fetchOverTimeData, - [], - ), - )), - ) as _i12.Future<_i5.FetchOverTimeDataResponse>); + Invocation.method(#fetchOverTimeData, []), + returnValue: _i12.Future<_i5.FetchOverTimeDataResponse>.value( + _FakeFetchOverTimeDataResponse_7( + this, + Invocation.method(#fetchOverTimeData, []), + ), + ), + ) + as _i12.Future<_i5.FetchOverTimeDataResponse>); @override _i12.Future<_i5.FetchLogsResponse> fetchLogs( @@ -1494,25 +1218,15 @@ class MockApiGatewayV5 extends _i1.Mock implements _i26.ApiGatewayV5 { DateTime? until, ) => (super.noSuchMethod( - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - returnValue: - _i12.Future<_i5.FetchLogsResponse>.value(_FakeFetchLogsResponse_8( - this, - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - )), - ) as _i12.Future<_i5.FetchLogsResponse>); + Invocation.method(#fetchLogs, [from, until]), + returnValue: _i12.Future<_i5.FetchLogsResponse>.value( + _FakeFetchLogsResponse_8( + this, + Invocation.method(#fetchLogs, [from, until]), + ), + ), + ) + as _i12.Future<_i5.FetchLogsResponse>); @override _i12.Future<_i5.SetWhiteBlacklistResponse> setWhiteBlacklist( @@ -1520,77 +1234,58 @@ class MockApiGatewayV5 extends _i1.Mock implements _i26.ApiGatewayV5 { String? list, ) => (super.noSuchMethod( - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - returnValue: _i12.Future<_i5.SetWhiteBlacklistResponse>.value( - _FakeSetWhiteBlacklistResponse_9( - this, - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - )), - ) as _i12.Future<_i5.SetWhiteBlacklistResponse>); - - @override - _i12.Future<_i5.GetDomainLists> getDomainLists() => (super.noSuchMethod( - Invocation.method( - #getDomainLists, - [], - ), - returnValue: - _i12.Future<_i5.GetDomainLists>.value(_FakeGetDomainLists_10( - this, - Invocation.method( - #getDomainLists, - [], - ), - )), - ) as _i12.Future<_i5.GetDomainLists>); + Invocation.method(#setWhiteBlacklist, [domain, list]), + returnValue: _i12.Future<_i5.SetWhiteBlacklistResponse>.value( + _FakeSetWhiteBlacklistResponse_9( + this, + Invocation.method(#setWhiteBlacklist, [domain, list]), + ), + ), + ) + as _i12.Future<_i5.SetWhiteBlacklistResponse>); + + @override + _i12.Future<_i5.GetDomainLists> getDomainLists() => + (super.noSuchMethod( + Invocation.method(#getDomainLists, []), + returnValue: _i12.Future<_i5.GetDomainLists>.value( + _FakeGetDomainLists_10( + this, + Invocation.method(#getDomainLists, []), + ), + ), + ) + as _i12.Future<_i5.GetDomainLists>); @override _i12.Future<_i5.RemoveDomainFromListResponse> removeDomainFromList( - _i25.Domain? domain) => - (super.noSuchMethod( - Invocation.method( - #removeDomainFromList, - [domain], - ), - returnValue: _i12.Future<_i5.RemoveDomainFromListResponse>.value( - _FakeRemoveDomainFromListResponse_11( - this, - Invocation.method( - #removeDomainFromList, - [domain], - ), - )), - ) as _i12.Future<_i5.RemoveDomainFromListResponse>); + _i25.Domain? domain, + ) => + (super.noSuchMethod( + Invocation.method(#removeDomainFromList, [domain]), + returnValue: _i12.Future<_i5.RemoveDomainFromListResponse>.value( + _FakeRemoveDomainFromListResponse_11( + this, + Invocation.method(#removeDomainFromList, [domain]), + ), + ), + ) + as _i12.Future<_i5.RemoveDomainFromListResponse>); @override _i12.Future<_i5.AddDomainToListResponse> addDomainToList( - Map? domainData) => - (super.noSuchMethod( - Invocation.method( - #addDomainToList, - [domainData], - ), - returnValue: _i12.Future<_i5.AddDomainToListResponse>.value( - _FakeAddDomainToListResponse_12( - this, - Invocation.method( - #addDomainToList, - [domainData], - ), - )), - ) as _i12.Future<_i5.AddDomainToListResponse>); + Map? domainData, + ) => + (super.noSuchMethod( + Invocation.method(#addDomainToList, [domainData]), + returnValue: _i12.Future<_i5.AddDomainToListResponse>.value( + _FakeAddDomainToListResponse_12( + this, + Invocation.method(#addDomainToList, [domainData]), + ), + ), + ) + as _i12.Future<_i5.AddDomainToListResponse>); } /// A class which mocks [ApiGatewayV6]. @@ -1602,13 +1297,12 @@ class MockApiGatewayV6 extends _i1.Mock implements _i27.ApiGatewayV6 { } @override - _i3.Server get server => (super.noSuchMethod( - Invocation.getter(#server), - returnValue: _FakeServer_1( - this, - Invocation.getter(#server), - ), - ) as _i3.Server); + _i3.Server get server => + (super.noSuchMethod( + Invocation.getter(#server), + returnValue: _FakeServer_1(this, Invocation.getter(#server)), + ) + as _i3.Server); @override _i12.Future<_i4.Response> httpClient({ @@ -1620,121 +1314,94 @@ class MockApiGatewayV6 extends _i1.Mock implements _i27.ApiGatewayV6 { int? maxRetries = 1, }) => (super.noSuchMethod( - Invocation.method( - #httpClient, - [], - { - #method: method, - #url: url, - #headers: headers, - #body: body, - #timeout: timeout, - #maxRetries: maxRetries, - }, - ), - returnValue: _i12.Future<_i4.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #httpClient, - [], - { + Invocation.method(#httpClient, [], { #method: method, #url: url, #headers: headers, #body: body, #timeout: timeout, #maxRetries: maxRetries, - }, - ), - )), - ) as _i12.Future<_i4.Response>); + }), + returnValue: _i12.Future<_i4.Response>.value( + _FakeResponse_2( + this, + Invocation.method(#httpClient, [], { + #method: method, + #url: url, + #headers: headers, + #body: body, + #timeout: timeout, + #maxRetries: maxRetries, + }), + ), + ), + ) + as _i12.Future<_i4.Response>); @override _i12.Future<_i5.LoginQueryResponse> loginQuery({bool? refresh = false}) => (super.noSuchMethod( - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - returnValue: - _i12.Future<_i5.LoginQueryResponse>.value(_FakeLoginQueryResponse_3( - this, - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - )), - ) as _i12.Future<_i5.LoginQueryResponse>); + Invocation.method(#loginQuery, [], {#refresh: refresh}), + returnValue: _i12.Future<_i5.LoginQueryResponse>.value( + _FakeLoginQueryResponse_3( + this, + Invocation.method(#loginQuery, [], {#refresh: refresh}), + ), + ), + ) + as _i12.Future<_i5.LoginQueryResponse>); @override _i12.Future<_i5.RealtimeStatusResponse> realtimeStatus() => (super.noSuchMethod( - Invocation.method( - #realtimeStatus, - [], - ), - returnValue: _i12.Future<_i5.RealtimeStatusResponse>.value( - _FakeRealtimeStatusResponse_4( - this, - Invocation.method( - #realtimeStatus, - [], - ), - )), - ) as _i12.Future<_i5.RealtimeStatusResponse>); + Invocation.method(#realtimeStatus, []), + returnValue: _i12.Future<_i5.RealtimeStatusResponse>.value( + _FakeRealtimeStatusResponse_4( + this, + Invocation.method(#realtimeStatus, []), + ), + ), + ) + as _i12.Future<_i5.RealtimeStatusResponse>); @override _i12.Future<_i5.DisableServerResponse> disableServerRequest(int? time) => (super.noSuchMethod( - Invocation.method( - #disableServerRequest, - [time], - ), - returnValue: _i12.Future<_i5.DisableServerResponse>.value( - _FakeDisableServerResponse_5( - this, - Invocation.method( - #disableServerRequest, - [time], - ), - )), - ) as _i12.Future<_i5.DisableServerResponse>); + Invocation.method(#disableServerRequest, [time]), + returnValue: _i12.Future<_i5.DisableServerResponse>.value( + _FakeDisableServerResponse_5( + this, + Invocation.method(#disableServerRequest, [time]), + ), + ), + ) + as _i12.Future<_i5.DisableServerResponse>); @override _i12.Future<_i5.EnableServerResponse> enableServerRequest() => (super.noSuchMethod( - Invocation.method( - #enableServerRequest, - [], - ), - returnValue: _i12.Future<_i5.EnableServerResponse>.value( - _FakeEnableServerResponse_6( - this, - Invocation.method( - #enableServerRequest, - [], - ), - )), - ) as _i12.Future<_i5.EnableServerResponse>); + Invocation.method(#enableServerRequest, []), + returnValue: _i12.Future<_i5.EnableServerResponse>.value( + _FakeEnableServerResponse_6( + this, + Invocation.method(#enableServerRequest, []), + ), + ), + ) + as _i12.Future<_i5.EnableServerResponse>); @override _i12.Future<_i5.FetchOverTimeDataResponse> fetchOverTimeData() => (super.noSuchMethod( - Invocation.method( - #fetchOverTimeData, - [], - ), - returnValue: _i12.Future<_i5.FetchOverTimeDataResponse>.value( - _FakeFetchOverTimeDataResponse_7( - this, - Invocation.method( - #fetchOverTimeData, - [], - ), - )), - ) as _i12.Future<_i5.FetchOverTimeDataResponse>); + Invocation.method(#fetchOverTimeData, []), + returnValue: _i12.Future<_i5.FetchOverTimeDataResponse>.value( + _FakeFetchOverTimeDataResponse_7( + this, + Invocation.method(#fetchOverTimeData, []), + ), + ), + ) + as _i12.Future<_i5.FetchOverTimeDataResponse>); @override _i12.Future<_i5.FetchLogsResponse> fetchLogs( @@ -1742,25 +1409,15 @@ class MockApiGatewayV6 extends _i1.Mock implements _i27.ApiGatewayV6 { DateTime? until, ) => (super.noSuchMethod( - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - returnValue: - _i12.Future<_i5.FetchLogsResponse>.value(_FakeFetchLogsResponse_8( - this, - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - )), - ) as _i12.Future<_i5.FetchLogsResponse>); + Invocation.method(#fetchLogs, [from, until]), + returnValue: _i12.Future<_i5.FetchLogsResponse>.value( + _FakeFetchLogsResponse_8( + this, + Invocation.method(#fetchLogs, [from, until]), + ), + ), + ) + as _i12.Future<_i5.FetchLogsResponse>); @override _i12.Future<_i5.SetWhiteBlacklistResponse> setWhiteBlacklist( @@ -1768,75 +1425,56 @@ class MockApiGatewayV6 extends _i1.Mock implements _i27.ApiGatewayV6 { String? list, ) => (super.noSuchMethod( - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - returnValue: _i12.Future<_i5.SetWhiteBlacklistResponse>.value( - _FakeSetWhiteBlacklistResponse_9( - this, - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - )), - ) as _i12.Future<_i5.SetWhiteBlacklistResponse>); - - @override - _i12.Future<_i5.GetDomainLists> getDomainLists() => (super.noSuchMethod( - Invocation.method( - #getDomainLists, - [], - ), - returnValue: - _i12.Future<_i5.GetDomainLists>.value(_FakeGetDomainLists_10( - this, - Invocation.method( - #getDomainLists, - [], - ), - )), - ) as _i12.Future<_i5.GetDomainLists>); + Invocation.method(#setWhiteBlacklist, [domain, list]), + returnValue: _i12.Future<_i5.SetWhiteBlacklistResponse>.value( + _FakeSetWhiteBlacklistResponse_9( + this, + Invocation.method(#setWhiteBlacklist, [domain, list]), + ), + ), + ) + as _i12.Future<_i5.SetWhiteBlacklistResponse>); + + @override + _i12.Future<_i5.GetDomainLists> getDomainLists() => + (super.noSuchMethod( + Invocation.method(#getDomainLists, []), + returnValue: _i12.Future<_i5.GetDomainLists>.value( + _FakeGetDomainLists_10( + this, + Invocation.method(#getDomainLists, []), + ), + ), + ) + as _i12.Future<_i5.GetDomainLists>); @override _i12.Future<_i5.RemoveDomainFromListResponse> removeDomainFromList( - _i25.Domain? domain) => - (super.noSuchMethod( - Invocation.method( - #removeDomainFromList, - [domain], - ), - returnValue: _i12.Future<_i5.RemoveDomainFromListResponse>.value( - _FakeRemoveDomainFromListResponse_11( - this, - Invocation.method( - #removeDomainFromList, - [domain], - ), - )), - ) as _i12.Future<_i5.RemoveDomainFromListResponse>); + _i25.Domain? domain, + ) => + (super.noSuchMethod( + Invocation.method(#removeDomainFromList, [domain]), + returnValue: _i12.Future<_i5.RemoveDomainFromListResponse>.value( + _FakeRemoveDomainFromListResponse_11( + this, + Invocation.method(#removeDomainFromList, [domain]), + ), + ), + ) + as _i12.Future<_i5.RemoveDomainFromListResponse>); @override _i12.Future<_i5.AddDomainToListResponse> addDomainToList( - Map? domainData) => - (super.noSuchMethod( - Invocation.method( - #addDomainToList, - [domainData], - ), - returnValue: _i12.Future<_i5.AddDomainToListResponse>.value( - _FakeAddDomainToListResponse_12( - this, - Invocation.method( - #addDomainToList, - [domainData], - ), - )), - ) as _i12.Future<_i5.AddDomainToListResponse>); + Map? domainData, + ) => + (super.noSuchMethod( + Invocation.method(#addDomainToList, [domainData]), + returnValue: _i12.Future<_i5.AddDomainToListResponse>.value( + _FakeAddDomainToListResponse_12( + this, + Invocation.method(#addDomainToList, [domainData]), + ), + ), + ) + as _i12.Future<_i5.AddDomainToListResponse>); } diff --git a/test/widgets/home/widgets/queries_last_hours_line_test.mocks.dart b/test/widgets/home/widgets/queries_last_hours_line_test.mocks.dart deleted file mode 100644 index c70698fe..00000000 --- a/test/widgets/home/widgets/queries_last_hours_line_test.mocks.dart +++ /dev/null @@ -1,437 +0,0 @@ -// Mocks generated by Mockito 5.4.5 from annotations -// in pi_hole_client/test/widgets/home/widgets/queries_last_hours_line_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i9; -import 'dart:ui' as _i11; - -import 'package:device_info_plus/device_info_plus.dart' as _i8; -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i5; -import 'package:package_info_plus/package_info_plus.dart' as _i7; -import 'package:pi_hole_client/config/theme.dart' as _i2; -import 'package:pi_hole_client/models/app_log.dart' as _i6; -import 'package:pi_hole_client/models/repository/database.dart' as _i10; -import 'package:pi_hole_client/providers/app_config_provider.dart' as _i3; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable -// 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 _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { - _FakeAppColors_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [AppConfigProvider]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockAppConfigProvider extends _i1.Mock implements _i3.AppConfigProvider { - MockAppConfigProvider() { - _i1.throwOnMissingStub(this); - } - - @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); - - @override - bool get showingSnackbar => (super.noSuchMethod( - Invocation.getter(#showingSnackbar), - returnValue: false, - ) as bool); - - @override - int get selectedTab => (super.noSuchMethod( - Invocation.getter(#selectedTab), - returnValue: 0, - ) as int); - - @override - _i4.ThemeMode get selectedTheme => (super.noSuchMethod( - Invocation.getter(#selectedTheme), - returnValue: _i4.ThemeMode.system, - ) as _i4.ThemeMode); - - @override - String get selectedLanguage => (super.noSuchMethod( - Invocation.getter(#selectedLanguage), - returnValue: _i5.dummyValue( - this, - Invocation.getter(#selectedLanguage), - ), - ) as String); - - @override - int get selectedThemeNumber => (super.noSuchMethod( - Invocation.getter(#selectedThemeNumber), - returnValue: 0, - ) as int); - - @override - int get selectedLanguageNumber => (super.noSuchMethod( - Invocation.getter(#selectedLanguageNumber), - returnValue: 0, - ) as int); - - @override - bool get overrideSslCheck => (super.noSuchMethod( - Invocation.getter(#overrideSslCheck), - returnValue: false, - ) as bool); - - @override - bool get reducedDataCharts => (super.noSuchMethod( - Invocation.getter(#reducedDataCharts), - returnValue: false, - ) as bool); - - @override - double get logsPerQuery => (super.noSuchMethod( - Invocation.getter(#logsPerQuery), - returnValue: 0.0, - ) as double); - - @override - bool get biometricsSupport => (super.noSuchMethod( - Invocation.getter(#biometricsSupport), - returnValue: false, - ) as bool); - - @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); - - @override - bool get appUnlocked => (super.noSuchMethod( - Invocation.getter(#appUnlocked), - returnValue: false, - ) as bool); - - @override - bool get validVibrator => (super.noSuchMethod( - Invocation.getter(#validVibrator), - returnValue: false, - ) as bool); - - @override - bool get importantInfoReaden => (super.noSuchMethod( - Invocation.getter(#importantInfoReaden), - returnValue: false, - ) as bool); - - @override - bool get hideZeroValues => (super.noSuchMethod( - Invocation.getter(#hideZeroValues), - returnValue: false, - ) as bool); - - @override - int get statisticsVisualizationMode => (super.noSuchMethod( - Invocation.getter(#statisticsVisualizationMode), - returnValue: 0, - ) as int); - - @override - bool get sendCrashReports => (super.noSuchMethod( - Invocation.getter(#sendCrashReports), - returnValue: false, - ) as bool); - - @override - List<_i6.AppLog> get logs => (super.noSuchMethod( - Invocation.getter(#logs), - returnValue: <_i6.AppLog>[], - ) as List<_i6.AppLog>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void setShowingSnackbar(bool? status) => super.noSuchMethod( - Invocation.method( - #setShowingSnackbar, - [status], - ), - returnValueForMissingStub: null, - ); - - @override - void setSelectedTab(int? selectedTab) => super.noSuchMethod( - Invocation.method( - #setSelectedTab, - [selectedTab], - ), - returnValueForMissingStub: null, - ); - - @override - void setAppInfo(_i7.PackageInfo? appInfo) => super.noSuchMethod( - Invocation.method( - #setAppInfo, - [appInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setAndroidInfo(_i8.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setAndroidInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setIosInfo(_i8.IosDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setIosInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( - Invocation.method( - #setBiometricsSupport, - [isSupported], - ), - returnValueForMissingStub: null, - ); - - @override - void setAppUnlocked(bool? status) => super.noSuchMethod( - Invocation.method( - #setAppUnlocked, - [status], - ), - returnValueForMissingStub: null, - ); - - @override - void setValidVibrator(bool? valid) => super.noSuchMethod( - Invocation.method( - #setValidVibrator, - [valid], - ), - returnValueForMissingStub: null, - ); - - @override - void addLog(_i6.AppLog? log) => super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValueForMissingStub: null, - ); - - @override - void setSelectedSettingsScreen({ - required int? screen, - bool? notify, - }) => - super.noSuchMethod( - Invocation.method( - #setSelectedSettingsScreen, - [], - { - #screen: screen, - #notify: notify, - }, - ), - returnValueForMissingStub: null, - ); - - @override - _i9.Future setUseBiometrics(bool? biometrics) => (super.noSuchMethod( - Invocation.method( - #setUseBiometrics, - [biometrics], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setImportantInfoReaden(bool? status) => (super.noSuchMethod( - Invocation.method( - #setImportantInfoReaden, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setPassCode(String? code) => (super.noSuchMethod( - Invocation.method( - #setPassCode, - [code], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setAutoRefreshTime(int? seconds) => (super.noSuchMethod( - Invocation.method( - #setAutoRefreshTime, - [seconds], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setLogsPerQuery(double? time) => (super.noSuchMethod( - Invocation.method( - #setLogsPerQuery, - [time], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setSendCrashReports(bool? status) => (super.noSuchMethod( - Invocation.method( - #setSendCrashReports, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - void saveFromDb(_i10.AppDbData? dbData) => super.noSuchMethod( - Invocation.method( - #saveFromDb, - [dbData], - ), - returnValueForMissingStub: null, - ); - - @override - _i9.Future setOverrideSslCheck(bool? status) => (super.noSuchMethod( - Invocation.method( - #setOverrideSslCheck, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setReducedDataCharts(bool? status) => (super.noSuchMethod( - Invocation.method( - #setReducedDataCharts, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setHideZeroValues(bool? status) => (super.noSuchMethod( - Invocation.method( - #setHideZeroValues, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setSelectedTheme(int? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedTheme, - [value], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setSelectedLanguage(String? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedLanguage, - [value], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setStatisticsVisualizationMode(int? value) => - (super.noSuchMethod( - Invocation.method( - #setStatisticsVisualizationMode, - [value], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future restoreAppConfig() => (super.noSuchMethod( - Invocation.method( - #restoreAppConfig, - [], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} diff --git a/test/widgets/app_logs/app_logs_test.dart b/test/widgets/screens/app_logs/app_logs_test.dart similarity index 99% rename from test/widgets/app_logs/app_logs_test.dart rename to test/widgets/screens/app_logs/app_logs_test.dart index 00cf6b1f..fe065cd6 100644 --- a/test/widgets/app_logs/app_logs_test.dart +++ b/test/widgets/screens/app_logs/app_logs_test.dart @@ -4,7 +4,7 @@ import 'package:mockito/mockito.dart'; import 'package:pi_hole_client/screens/app_logs/app_log_details_modal.dart'; import 'package:pi_hole_client/screens/app_logs/app_logs.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/domains/domains_test.dart b/test/widgets/screens/domains/domains_test.dart similarity index 99% rename from test/widgets/domains/domains_test.dart rename to test/widgets/screens/domains/domains_test.dart index f59f0a8e..d614430c 100644 --- a/test/widgets/domains/domains_test.dart +++ b/test/widgets/screens/domains/domains_test.dart @@ -19,7 +19,7 @@ import 'package:pi_hole_client/screens/domains/domain_details_screen.dart'; import 'package:pi_hole_client/screens/domains/domains.dart'; import 'package:provider/provider.dart'; -import './domains_test.mocks.dart'; +import 'domains_test.mocks.dart'; @GenerateMocks( [AppConfigProvider, ServersProvider, ApiGatewayV6], diff --git a/test/widgets/screens/domains/domains_test.mocks.dart b/test/widgets/screens/domains/domains_test.mocks.dart new file mode 100644 index 00000000..cd24d32c --- /dev/null +++ b/test/widgets/screens/domains/domains_test.mocks.dart @@ -0,0 +1,825 @@ +// Mocks generated by Mockito 5.4.5 from annotations +// in pi_hole_client/test/widgets/screens/domains/domains_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i12; +import 'dart:ui' as _i14; + +import 'package:device_info_plus/device_info_plus.dart' as _i11; +import 'package:flutter/material.dart' as _i7; +import 'package:http/http.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i8; +import 'package:package_info_plus/package_info_plus.dart' as _i10; +import 'package:pi_hole_client/config/theme.dart' as _i2; +import 'package:pi_hole_client/gateways/api_gateway_interface.dart' as _i17; +import 'package:pi_hole_client/gateways/v6/api_gateway_v6.dart' as _i18; +import 'package:pi_hole_client/models/app_log.dart' as _i9; +import 'package:pi_hole_client/models/domain.dart' as _i19; +import 'package:pi_hole_client/models/gateways.dart' as _i5; +import 'package:pi_hole_client/models/query_status.dart' as _i16; +import 'package:pi_hole_client/models/repository/database.dart' as _i13; +import 'package:pi_hole_client/models/server.dart' as _i3; +import 'package:pi_hole_client/providers/app_config_provider.dart' as _i6; +import 'package:pi_hole_client/providers/servers_provider.dart' as _i15; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable +// 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 _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { + _FakeAppColors_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeServer_1 extends _i1.SmartFake implements _i3.Server { + _FakeServer_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeResponse_2 extends _i1.SmartFake implements _i4.Response { + _FakeResponse_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeLoginQueryResponse_3 extends _i1.SmartFake + implements _i5.LoginQueryResponse { + _FakeLoginQueryResponse_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeRealtimeStatusResponse_4 extends _i1.SmartFake + implements _i5.RealtimeStatusResponse { + _FakeRealtimeStatusResponse_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeDisableServerResponse_5 extends _i1.SmartFake + implements _i5.DisableServerResponse { + _FakeDisableServerResponse_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeEnableServerResponse_6 extends _i1.SmartFake + implements _i5.EnableServerResponse { + _FakeEnableServerResponse_6(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeFetchOverTimeDataResponse_7 extends _i1.SmartFake + implements _i5.FetchOverTimeDataResponse { + _FakeFetchOverTimeDataResponse_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeFetchLogsResponse_8 extends _i1.SmartFake + implements _i5.FetchLogsResponse { + _FakeFetchLogsResponse_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeSetWhiteBlacklistResponse_9 extends _i1.SmartFake + implements _i5.SetWhiteBlacklistResponse { + _FakeSetWhiteBlacklistResponse_9(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeGetDomainLists_10 extends _i1.SmartFake + implements _i5.GetDomainLists { + _FakeGetDomainLists_10(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeRemoveDomainFromListResponse_11 extends _i1.SmartFake + implements _i5.RemoveDomainFromListResponse { + _FakeRemoveDomainFromListResponse_11( + Object parent, + Invocation parentInvocation, + ) : super(parent, parentInvocation); +} + +class _FakeAddDomainToListResponse_12 extends _i1.SmartFake + implements _i5.AddDomainToListResponse { + _FakeAddDomainToListResponse_12(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +/// A class which mocks [AppConfigProvider]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockAppConfigProvider extends _i1.Mock implements _i6.AppConfigProvider { + MockAppConfigProvider() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); + + @override + bool get showingSnackbar => + (super.noSuchMethod( + Invocation.getter(#showingSnackbar), + returnValue: false, + ) + as bool); + + @override + int get selectedTab => + (super.noSuchMethod(Invocation.getter(#selectedTab), returnValue: 0) + as int); + + @override + _i7.ThemeMode get selectedTheme => + (super.noSuchMethod( + Invocation.getter(#selectedTheme), + returnValue: _i7.ThemeMode.system, + ) + as _i7.ThemeMode); + + @override + String get selectedLanguage => + (super.noSuchMethod( + Invocation.getter(#selectedLanguage), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#selectedLanguage), + ), + ) + as String); + + @override + int get selectedThemeNumber => + (super.noSuchMethod( + Invocation.getter(#selectedThemeNumber), + returnValue: 0, + ) + as int); + + @override + int get selectedLanguageNumber => + (super.noSuchMethod( + Invocation.getter(#selectedLanguageNumber), + returnValue: 0, + ) + as int); + + @override + bool get overrideSslCheck => + (super.noSuchMethod( + Invocation.getter(#overrideSslCheck), + returnValue: false, + ) + as bool); + + @override + bool get reducedDataCharts => + (super.noSuchMethod( + Invocation.getter(#reducedDataCharts), + returnValue: false, + ) + as bool); + + @override + double get logsPerQuery => + (super.noSuchMethod(Invocation.getter(#logsPerQuery), returnValue: 0.0) + as double); + + @override + bool get biometricsSupport => + (super.noSuchMethod( + Invocation.getter(#biometricsSupport), + returnValue: false, + ) + as bool); + + @override + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); + + @override + bool get appUnlocked => + (super.noSuchMethod(Invocation.getter(#appUnlocked), returnValue: false) + as bool); + + @override + bool get validVibrator => + (super.noSuchMethod(Invocation.getter(#validVibrator), returnValue: false) + as bool); + + @override + bool get importantInfoReaden => + (super.noSuchMethod( + Invocation.getter(#importantInfoReaden), + returnValue: false, + ) + as bool); + + @override + bool get hideZeroValues => + (super.noSuchMethod( + Invocation.getter(#hideZeroValues), + returnValue: false, + ) + as bool); + + @override + int get statisticsVisualizationMode => + (super.noSuchMethod( + Invocation.getter(#statisticsVisualizationMode), + returnValue: 0, + ) + as int); + + @override + bool get sendCrashReports => + (super.noSuchMethod( + Invocation.getter(#sendCrashReports), + returnValue: false, + ) + as bool); + + @override + List<_i9.AppLog> get logs => + (super.noSuchMethod(Invocation.getter(#logs), returnValue: <_i9.AppLog>[]) + as List<_i9.AppLog>); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); + + @override + void setShowingSnackbar(bool? status) => super.noSuchMethod( + Invocation.method(#setShowingSnackbar, [status]), + returnValueForMissingStub: null, + ); + + @override + void setSelectedTab(int? selectedTab) => super.noSuchMethod( + Invocation.method(#setSelectedTab, [selectedTab]), + returnValueForMissingStub: null, + ); + + @override + void setAppInfo(_i10.PackageInfo? appInfo) => super.noSuchMethod( + Invocation.method(#setAppInfo, [appInfo]), + returnValueForMissingStub: null, + ); + + @override + void setAndroidInfo(_i11.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( + Invocation.method(#setAndroidInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); + + @override + void setIosInfo(_i11.IosDeviceInfo? deviceInfo) => super.noSuchMethod( + Invocation.method(#setIosInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); + + @override + void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( + Invocation.method(#setBiometricsSupport, [isSupported]), + returnValueForMissingStub: null, + ); + + @override + void setAppUnlocked(bool? status) => super.noSuchMethod( + Invocation.method(#setAppUnlocked, [status]), + returnValueForMissingStub: null, + ); + + @override + void setValidVibrator(bool? valid) => super.noSuchMethod( + Invocation.method(#setValidVibrator, [valid]), + returnValueForMissingStub: null, + ); + + @override + void addLog(_i9.AppLog? log) => super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValueForMissingStub: null, + ); + + @override + void setSelectedSettingsScreen({required int? screen, bool? notify}) => + super.noSuchMethod( + Invocation.method(#setSelectedSettingsScreen, [], { + #screen: screen, + #notify: notify, + }), + returnValueForMissingStub: null, + ); + + @override + _i12.Future setUseBiometrics(bool? biometrics) => + (super.noSuchMethod( + Invocation.method(#setUseBiometrics, [biometrics]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setImportantInfoReaden(bool? status) => + (super.noSuchMethod( + Invocation.method(#setImportantInfoReaden, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setPassCode(String? code) => + (super.noSuchMethod( + Invocation.method(#setPassCode, [code]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setAutoRefreshTime(int? seconds) => + (super.noSuchMethod( + Invocation.method(#setAutoRefreshTime, [seconds]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setLogsPerQuery(double? time) => + (super.noSuchMethod( + Invocation.method(#setLogsPerQuery, [time]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setSendCrashReports(bool? status) => + (super.noSuchMethod( + Invocation.method(#setSendCrashReports, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + void saveFromDb(_i13.AppDbData? dbData) => super.noSuchMethod( + Invocation.method(#saveFromDb, [dbData]), + returnValueForMissingStub: null, + ); + + @override + _i12.Future setOverrideSslCheck(bool? status) => + (super.noSuchMethod( + Invocation.method(#setOverrideSslCheck, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setReducedDataCharts(bool? status) => + (super.noSuchMethod( + Invocation.method(#setReducedDataCharts, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setHideZeroValues(bool? status) => + (super.noSuchMethod( + Invocation.method(#setHideZeroValues, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setSelectedTheme(int? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedTheme, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setSelectedLanguage(String? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedLanguage, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setStatisticsVisualizationMode(int? value) => + (super.noSuchMethod( + Invocation.method(#setStatisticsVisualizationMode, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future restoreAppConfig() => + (super.noSuchMethod( + Invocation.method(#restoreAppConfig, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void dispose() => super.noSuchMethod( + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); + + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [ServersProvider]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockServersProvider extends _i1.Mock implements _i15.ServersProvider { + MockServersProvider() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); + + @override + List<_i3.Server> get getServersList => + (super.noSuchMethod( + Invocation.getter(#getServersList), + returnValue: <_i3.Server>[], + ) + as List<_i3.Server>); + + @override + int get numShown => + (super.noSuchMethod(Invocation.getter(#numShown), returnValue: 0) as int); + + @override + List<_i16.QueryStatus> get queryStatuses => + (super.noSuchMethod( + Invocation.getter(#queryStatuses), + returnValue: <_i16.QueryStatus>[], + ) + as List<_i16.QueryStatus>); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); + + @override + void update(_i6.AppConfigProvider? provider) => super.noSuchMethod( + Invocation.method(#update, [provider]), + returnValueForMissingStub: null, + ); + + @override + _i17.ApiGateway? loadApiGateway(_i3.Server? server) => + (super.noSuchMethod(Invocation.method(#loadApiGateway, [server])) + as _i17.ApiGateway?); + + @override + _i16.QueryStatus? getQueryStatus(String? key) => + (super.noSuchMethod(Invocation.method(#getQueryStatus, [key])) + as _i16.QueryStatus?); + + @override + _i16.QueryStatus? findQueryStatus(String? key) => + (super.noSuchMethod(Invocation.method(#findQueryStatus, [key])) + as _i16.QueryStatus?); + + @override + _i12.Future addServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#addServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future editServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#editServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future removeServer(String? serverAddress) => + (super.noSuchMethod( + Invocation.method(#removeServer, [serverAddress]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setDefaultServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#setDefaultServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future saveFromDb(List<_i13.ServerDbData>? servers) => + (super.noSuchMethod( + Invocation.method(#saveFromDb, [servers]), + returnValue: _i12.Future.value(), + ) + as _i12.Future); + + @override + _i12.FutureOr> checkUrlExists(String? url) => + (super.noSuchMethod( + Invocation.method(#checkUrlExists, [url]), + returnValue: _i12.Future>.value( + {}, + ), + ) + as _i12.FutureOr>); + + @override + void setselectedServer({required _i3.Server? server, bool? toHomeTab}) => + super.noSuchMethod( + Invocation.method(#setselectedServer, [], { + #server: server, + #toHomeTab: toHomeTab, + }), + returnValueForMissingStub: null, + ); + + @override + void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( + Invocation.method(#updateselectedServerStatus, [enabled]), + returnValueForMissingStub: null, + ); + + @override + _i12.Future deleteDbData() => + (super.noSuchMethod( + Invocation.method(#deleteDbData, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future resetSelectedServer() => + (super.noSuchMethod( + Invocation.method(#resetSelectedServer, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void dispose() => super.noSuchMethod( + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); + + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [ApiGatewayV6]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockApiGatewayV6 extends _i1.Mock implements _i18.ApiGatewayV6 { + MockApiGatewayV6() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Server get server => + (super.noSuchMethod( + Invocation.getter(#server), + returnValue: _FakeServer_1(this, Invocation.getter(#server)), + ) + as _i3.Server); + + @override + _i12.Future<_i4.Response> httpClient({ + required String? method, + required String? url, + Map? headers, + Map? body, + int? timeout = 10, + int? maxRetries = 1, + }) => + (super.noSuchMethod( + Invocation.method(#httpClient, [], { + #method: method, + #url: url, + #headers: headers, + #body: body, + #timeout: timeout, + #maxRetries: maxRetries, + }), + returnValue: _i12.Future<_i4.Response>.value( + _FakeResponse_2( + this, + Invocation.method(#httpClient, [], { + #method: method, + #url: url, + #headers: headers, + #body: body, + #timeout: timeout, + #maxRetries: maxRetries, + }), + ), + ), + ) + as _i12.Future<_i4.Response>); + + @override + _i12.Future<_i5.LoginQueryResponse> loginQuery({bool? refresh = false}) => + (super.noSuchMethod( + Invocation.method(#loginQuery, [], {#refresh: refresh}), + returnValue: _i12.Future<_i5.LoginQueryResponse>.value( + _FakeLoginQueryResponse_3( + this, + Invocation.method(#loginQuery, [], {#refresh: refresh}), + ), + ), + ) + as _i12.Future<_i5.LoginQueryResponse>); + + @override + _i12.Future<_i5.RealtimeStatusResponse> realtimeStatus() => + (super.noSuchMethod( + Invocation.method(#realtimeStatus, []), + returnValue: _i12.Future<_i5.RealtimeStatusResponse>.value( + _FakeRealtimeStatusResponse_4( + this, + Invocation.method(#realtimeStatus, []), + ), + ), + ) + as _i12.Future<_i5.RealtimeStatusResponse>); + + @override + _i12.Future<_i5.DisableServerResponse> disableServerRequest(int? time) => + (super.noSuchMethod( + Invocation.method(#disableServerRequest, [time]), + returnValue: _i12.Future<_i5.DisableServerResponse>.value( + _FakeDisableServerResponse_5( + this, + Invocation.method(#disableServerRequest, [time]), + ), + ), + ) + as _i12.Future<_i5.DisableServerResponse>); + + @override + _i12.Future<_i5.EnableServerResponse> enableServerRequest() => + (super.noSuchMethod( + Invocation.method(#enableServerRequest, []), + returnValue: _i12.Future<_i5.EnableServerResponse>.value( + _FakeEnableServerResponse_6( + this, + Invocation.method(#enableServerRequest, []), + ), + ), + ) + as _i12.Future<_i5.EnableServerResponse>); + + @override + _i12.Future<_i5.FetchOverTimeDataResponse> fetchOverTimeData() => + (super.noSuchMethod( + Invocation.method(#fetchOverTimeData, []), + returnValue: _i12.Future<_i5.FetchOverTimeDataResponse>.value( + _FakeFetchOverTimeDataResponse_7( + this, + Invocation.method(#fetchOverTimeData, []), + ), + ), + ) + as _i12.Future<_i5.FetchOverTimeDataResponse>); + + @override + _i12.Future<_i5.FetchLogsResponse> fetchLogs( + DateTime? from, + DateTime? until, + ) => + (super.noSuchMethod( + Invocation.method(#fetchLogs, [from, until]), + returnValue: _i12.Future<_i5.FetchLogsResponse>.value( + _FakeFetchLogsResponse_8( + this, + Invocation.method(#fetchLogs, [from, until]), + ), + ), + ) + as _i12.Future<_i5.FetchLogsResponse>); + + @override + _i12.Future<_i5.SetWhiteBlacklistResponse> setWhiteBlacklist( + String? domain, + String? list, + ) => + (super.noSuchMethod( + Invocation.method(#setWhiteBlacklist, [domain, list]), + returnValue: _i12.Future<_i5.SetWhiteBlacklistResponse>.value( + _FakeSetWhiteBlacklistResponse_9( + this, + Invocation.method(#setWhiteBlacklist, [domain, list]), + ), + ), + ) + as _i12.Future<_i5.SetWhiteBlacklistResponse>); + + @override + _i12.Future<_i5.GetDomainLists> getDomainLists() => + (super.noSuchMethod( + Invocation.method(#getDomainLists, []), + returnValue: _i12.Future<_i5.GetDomainLists>.value( + _FakeGetDomainLists_10( + this, + Invocation.method(#getDomainLists, []), + ), + ), + ) + as _i12.Future<_i5.GetDomainLists>); + + @override + _i12.Future<_i5.RemoveDomainFromListResponse> removeDomainFromList( + _i19.Domain? domain, + ) => + (super.noSuchMethod( + Invocation.method(#removeDomainFromList, [domain]), + returnValue: _i12.Future<_i5.RemoveDomainFromListResponse>.value( + _FakeRemoveDomainFromListResponse_11( + this, + Invocation.method(#removeDomainFromList, [domain]), + ), + ), + ) + as _i12.Future<_i5.RemoveDomainFromListResponse>); + + @override + _i12.Future<_i5.AddDomainToListResponse> addDomainToList( + Map? domainData, + ) => + (super.noSuchMethod( + Invocation.method(#addDomainToList, [domainData]), + returnValue: _i12.Future<_i5.AddDomainToListResponse>.value( + _FakeAddDomainToListResponse_12( + this, + Invocation.method(#addDomainToList, [domainData]), + ), + ), + ) + as _i12.Future<_i5.AddDomainToListResponse>); +} diff --git a/test/widgets/home/home_charts_test.dart b/test/widgets/screens/home/home_charts_test.dart similarity index 99% rename from test/widgets/home/home_charts_test.dart rename to test/widgets/screens/home/home_charts_test.dart index aa393368..2f04caba 100644 --- a/test/widgets/home/home_charts_test.dart +++ b/test/widgets/screens/home/home_charts_test.dart @@ -4,7 +4,7 @@ import 'package:mockito/mockito.dart'; import 'package:pi_hole_client/models/overtime_data.dart'; import 'package:pi_hole_client/screens/home/home_charts.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/home/home_test.dart b/test/widgets/screens/home/home_test.dart similarity index 99% rename from test/widgets/home/home_test.dart rename to test/widgets/screens/home/home_test.dart index e27861bb..c8d39f69 100644 --- a/test/widgets/home/home_test.dart +++ b/test/widgets/screens/home/home_test.dart @@ -8,7 +8,7 @@ import 'package:pi_hole_client/screens/home/home.dart'; import 'package:pi_hole_client/screens/home/home_appbar.dart'; import 'package:pi_hole_client/screens/home/switch_server_modal.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/home/widgets/queries_last_hours_line_test.dart b/test/widgets/screens/home/widgets/queries_last_hours_line_test.dart similarity index 99% rename from test/widgets/home/widgets/queries_last_hours_line_test.dart rename to test/widgets/screens/home/widgets/queries_last_hours_line_test.dart index 3b6ca3d1..b6b3e92a 100644 --- a/test/widgets/home/widgets/queries_last_hours_line_test.dart +++ b/test/widgets/screens/home/widgets/queries_last_hours_line_test.dart @@ -12,7 +12,7 @@ import 'package:pi_hole_client/providers/app_config_provider.dart'; import 'package:pi_hole_client/screens/home/widgets/queries_last_hours_line.dart'; import 'package:provider/provider.dart'; -import './queries_last_hours_line_test.mocks.dart'; +import 'queries_last_hours_line_test.mocks.dart'; @GenerateMocks( [AppConfigProvider], diff --git a/test/widgets/screens/home/widgets/queries_last_hours_line_test.mocks.dart b/test/widgets/screens/home/widgets/queries_last_hours_line_test.mocks.dart new file mode 100644 index 00000000..ffefa4cd --- /dev/null +++ b/test/widgets/screens/home/widgets/queries_last_hours_line_test.mocks.dart @@ -0,0 +1,385 @@ +// Mocks generated by Mockito 5.4.5 from annotations +// in pi_hole_client/test/widgets/screens/home/widgets/queries_last_hours_line_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i9; +import 'dart:ui' as _i11; + +import 'package:device_info_plus/device_info_plus.dart' as _i8; +import 'package:flutter/material.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i5; +import 'package:package_info_plus/package_info_plus.dart' as _i7; +import 'package:pi_hole_client/config/theme.dart' as _i2; +import 'package:pi_hole_client/models/app_log.dart' as _i6; +import 'package:pi_hole_client/models/repository/database.dart' as _i10; +import 'package:pi_hole_client/providers/app_config_provider.dart' as _i3; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable +// 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 _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { + _FakeAppColors_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +/// A class which mocks [AppConfigProvider]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockAppConfigProvider extends _i1.Mock implements _i3.AppConfigProvider { + MockAppConfigProvider() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); + + @override + bool get showingSnackbar => + (super.noSuchMethod( + Invocation.getter(#showingSnackbar), + returnValue: false, + ) + as bool); + + @override + int get selectedTab => + (super.noSuchMethod(Invocation.getter(#selectedTab), returnValue: 0) + as int); + + @override + _i4.ThemeMode get selectedTheme => + (super.noSuchMethod( + Invocation.getter(#selectedTheme), + returnValue: _i4.ThemeMode.system, + ) + as _i4.ThemeMode); + + @override + String get selectedLanguage => + (super.noSuchMethod( + Invocation.getter(#selectedLanguage), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#selectedLanguage), + ), + ) + as String); + + @override + int get selectedThemeNumber => + (super.noSuchMethod( + Invocation.getter(#selectedThemeNumber), + returnValue: 0, + ) + as int); + + @override + int get selectedLanguageNumber => + (super.noSuchMethod( + Invocation.getter(#selectedLanguageNumber), + returnValue: 0, + ) + as int); + + @override + bool get overrideSslCheck => + (super.noSuchMethod( + Invocation.getter(#overrideSslCheck), + returnValue: false, + ) + as bool); + + @override + bool get reducedDataCharts => + (super.noSuchMethod( + Invocation.getter(#reducedDataCharts), + returnValue: false, + ) + as bool); + + @override + double get logsPerQuery => + (super.noSuchMethod(Invocation.getter(#logsPerQuery), returnValue: 0.0) + as double); + + @override + bool get biometricsSupport => + (super.noSuchMethod( + Invocation.getter(#biometricsSupport), + returnValue: false, + ) + as bool); + + @override + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); + + @override + bool get appUnlocked => + (super.noSuchMethod(Invocation.getter(#appUnlocked), returnValue: false) + as bool); + + @override + bool get validVibrator => + (super.noSuchMethod(Invocation.getter(#validVibrator), returnValue: false) + as bool); + + @override + bool get importantInfoReaden => + (super.noSuchMethod( + Invocation.getter(#importantInfoReaden), + returnValue: false, + ) + as bool); + + @override + bool get hideZeroValues => + (super.noSuchMethod( + Invocation.getter(#hideZeroValues), + returnValue: false, + ) + as bool); + + @override + int get statisticsVisualizationMode => + (super.noSuchMethod( + Invocation.getter(#statisticsVisualizationMode), + returnValue: 0, + ) + as int); + + @override + bool get sendCrashReports => + (super.noSuchMethod( + Invocation.getter(#sendCrashReports), + returnValue: false, + ) + as bool); + + @override + List<_i6.AppLog> get logs => + (super.noSuchMethod(Invocation.getter(#logs), returnValue: <_i6.AppLog>[]) + as List<_i6.AppLog>); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); + + @override + void setShowingSnackbar(bool? status) => super.noSuchMethod( + Invocation.method(#setShowingSnackbar, [status]), + returnValueForMissingStub: null, + ); + + @override + void setSelectedTab(int? selectedTab) => super.noSuchMethod( + Invocation.method(#setSelectedTab, [selectedTab]), + returnValueForMissingStub: null, + ); + + @override + void setAppInfo(_i7.PackageInfo? appInfo) => super.noSuchMethod( + Invocation.method(#setAppInfo, [appInfo]), + returnValueForMissingStub: null, + ); + + @override + void setAndroidInfo(_i8.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( + Invocation.method(#setAndroidInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); + + @override + void setIosInfo(_i8.IosDeviceInfo? deviceInfo) => super.noSuchMethod( + Invocation.method(#setIosInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); + + @override + void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( + Invocation.method(#setBiometricsSupport, [isSupported]), + returnValueForMissingStub: null, + ); + + @override + void setAppUnlocked(bool? status) => super.noSuchMethod( + Invocation.method(#setAppUnlocked, [status]), + returnValueForMissingStub: null, + ); + + @override + void setValidVibrator(bool? valid) => super.noSuchMethod( + Invocation.method(#setValidVibrator, [valid]), + returnValueForMissingStub: null, + ); + + @override + void addLog(_i6.AppLog? log) => super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValueForMissingStub: null, + ); + + @override + void setSelectedSettingsScreen({required int? screen, bool? notify}) => + super.noSuchMethod( + Invocation.method(#setSelectedSettingsScreen, [], { + #screen: screen, + #notify: notify, + }), + returnValueForMissingStub: null, + ); + + @override + _i9.Future setUseBiometrics(bool? biometrics) => + (super.noSuchMethod( + Invocation.method(#setUseBiometrics, [biometrics]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setImportantInfoReaden(bool? status) => + (super.noSuchMethod( + Invocation.method(#setImportantInfoReaden, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setPassCode(String? code) => + (super.noSuchMethod( + Invocation.method(#setPassCode, [code]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setAutoRefreshTime(int? seconds) => + (super.noSuchMethod( + Invocation.method(#setAutoRefreshTime, [seconds]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setLogsPerQuery(double? time) => + (super.noSuchMethod( + Invocation.method(#setLogsPerQuery, [time]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setSendCrashReports(bool? status) => + (super.noSuchMethod( + Invocation.method(#setSendCrashReports, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + void saveFromDb(_i10.AppDbData? dbData) => super.noSuchMethod( + Invocation.method(#saveFromDb, [dbData]), + returnValueForMissingStub: null, + ); + + @override + _i9.Future setOverrideSslCheck(bool? status) => + (super.noSuchMethod( + Invocation.method(#setOverrideSslCheck, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setReducedDataCharts(bool? status) => + (super.noSuchMethod( + Invocation.method(#setReducedDataCharts, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setHideZeroValues(bool? status) => + (super.noSuchMethod( + Invocation.method(#setHideZeroValues, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setSelectedTheme(int? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedTheme, [value]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setSelectedLanguage(String? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedLanguage, [value]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setStatisticsVisualizationMode(int? value) => + (super.noSuchMethod( + Invocation.method(#setStatisticsVisualizationMode, [value]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future restoreAppConfig() => + (super.noSuchMethod( + Invocation.method(#restoreAppConfig, []), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void dispose() => super.noSuchMethod( + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); + + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); +} diff --git a/test/widgets/logs/clients_filters_modal_test.dart b/test/widgets/screens/logs/clients_filters_modal_test.dart similarity index 98% rename from test/widgets/logs/clients_filters_modal_test.dart rename to test/widgets/screens/logs/clients_filters_modal_test.dart index ecf8b516..48f89fe1 100644 --- a/test/widgets/logs/clients_filters_modal_test.dart +++ b/test/widgets/screens/logs/clients_filters_modal_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pi_hole_client/screens/logs/clients_filters_modal.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/logs/logs_filters_modal_test.dart b/test/widgets/screens/logs/logs_filters_modal_test.dart similarity index 98% rename from test/widgets/logs/logs_filters_modal_test.dart rename to test/widgets/screens/logs/logs_filters_modal_test.dart index d4848f6f..e8c33eb8 100644 --- a/test/widgets/logs/logs_filters_modal_test.dart +++ b/test/widgets/screens/logs/logs_filters_modal_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pi_hole_client/screens/logs/logs_filters_modal.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; // TODO: Fix this test // ═╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ diff --git a/test/widgets/logs/logs_test.dart b/test/widgets/screens/logs/logs_test.dart similarity index 99% rename from test/widgets/logs/logs_test.dart rename to test/widgets/screens/logs/logs_test.dart index 51e5f288..509c46d7 100644 --- a/test/widgets/logs/logs_test.dart +++ b/test/widgets/screens/logs/logs_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pi_hole_client/screens/logs/logs.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/logs/status_filters_modal_test.dart b/test/widgets/screens/logs/status_filters_modal_test.dart similarity index 99% rename from test/widgets/logs/status_filters_modal_test.dart rename to test/widgets/screens/logs/status_filters_modal_test.dart index 1bc6a2a1..e6844e27 100644 --- a/test/widgets/logs/status_filters_modal_test.dart +++ b/test/widgets/screens/logs/status_filters_modal_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pi_hole_client/screens/logs/status_filters_modal.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/servers/add_server_fullscreen_test.dart b/test/widgets/screens/servers/add_server_fullscreen_test.dart similarity index 99% rename from test/widgets/servers/add_server_fullscreen_test.dart rename to test/widgets/screens/servers/add_server_fullscreen_test.dart index cc6f9a8f..eb70904a 100644 --- a/test/widgets/servers/add_server_fullscreen_test.dart +++ b/test/widgets/screens/servers/add_server_fullscreen_test.dart @@ -18,7 +18,7 @@ import 'package:pi_hole_client/providers/servers_provider.dart'; import 'package:pi_hole_client/screens/servers/add_server_fullscreen.dart'; import 'package:provider/provider.dart'; -import './add_server_fullscreen_test.mocks.dart'; +import 'add_server_fullscreen_test.mocks.dart'; @GenerateMocks( [AppConfigProvider, ServersProvider, ApiGatewayV5], diff --git a/test/widgets/screens/servers/add_server_fullscreen_test.mocks.dart b/test/widgets/screens/servers/add_server_fullscreen_test.mocks.dart new file mode 100644 index 00000000..ceedd991 --- /dev/null +++ b/test/widgets/screens/servers/add_server_fullscreen_test.mocks.dart @@ -0,0 +1,833 @@ +// Mocks generated by Mockito 5.4.5 from annotations +// in pi_hole_client/test/widgets/screens/servers/add_server_fullscreen_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i12; +import 'dart:ui' as _i14; + +import 'package:device_info_plus/device_info_plus.dart' as _i11; +import 'package:flutter/material.dart' as _i7; +import 'package:http/http.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i8; +import 'package:package_info_plus/package_info_plus.dart' as _i10; +import 'package:pi_hole_client/config/theme.dart' as _i2; +import 'package:pi_hole_client/gateways/api_gateway_interface.dart' as _i17; +import 'package:pi_hole_client/gateways/v5/api_gateway_v5.dart' as _i18; +import 'package:pi_hole_client/models/app_log.dart' as _i9; +import 'package:pi_hole_client/models/domain.dart' as _i19; +import 'package:pi_hole_client/models/gateways.dart' as _i5; +import 'package:pi_hole_client/models/query_status.dart' as _i16; +import 'package:pi_hole_client/models/repository/database.dart' as _i13; +import 'package:pi_hole_client/models/server.dart' as _i3; +import 'package:pi_hole_client/providers/app_config_provider.dart' as _i6; +import 'package:pi_hole_client/providers/servers_provider.dart' as _i15; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable +// 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 _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { + _FakeAppColors_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeServer_1 extends _i1.SmartFake implements _i3.Server { + _FakeServer_1(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeResponse_2 extends _i1.SmartFake implements _i4.Response { + _FakeResponse_2(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeLoginQueryResponse_3 extends _i1.SmartFake + implements _i5.LoginQueryResponse { + _FakeLoginQueryResponse_3(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeRealtimeStatusResponse_4 extends _i1.SmartFake + implements _i5.RealtimeStatusResponse { + _FakeRealtimeStatusResponse_4(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeDisableServerResponse_5 extends _i1.SmartFake + implements _i5.DisableServerResponse { + _FakeDisableServerResponse_5(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeEnableServerResponse_6 extends _i1.SmartFake + implements _i5.EnableServerResponse { + _FakeEnableServerResponse_6(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeFetchOverTimeDataResponse_7 extends _i1.SmartFake + implements _i5.FetchOverTimeDataResponse { + _FakeFetchOverTimeDataResponse_7(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeFetchLogsResponse_8 extends _i1.SmartFake + implements _i5.FetchLogsResponse { + _FakeFetchLogsResponse_8(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeSetWhiteBlacklistResponse_9 extends _i1.SmartFake + implements _i5.SetWhiteBlacklistResponse { + _FakeSetWhiteBlacklistResponse_9(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeGetDomainLists_10 extends _i1.SmartFake + implements _i5.GetDomainLists { + _FakeGetDomainLists_10(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +class _FakeRemoveDomainFromListResponse_11 extends _i1.SmartFake + implements _i5.RemoveDomainFromListResponse { + _FakeRemoveDomainFromListResponse_11( + Object parent, + Invocation parentInvocation, + ) : super(parent, parentInvocation); +} + +class _FakeAddDomainToListResponse_12 extends _i1.SmartFake + implements _i5.AddDomainToListResponse { + _FakeAddDomainToListResponse_12(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +/// A class which mocks [AppConfigProvider]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockAppConfigProvider extends _i1.Mock implements _i6.AppConfigProvider { + MockAppConfigProvider() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); + + @override + bool get showingSnackbar => + (super.noSuchMethod( + Invocation.getter(#showingSnackbar), + returnValue: false, + ) + as bool); + + @override + int get selectedTab => + (super.noSuchMethod(Invocation.getter(#selectedTab), returnValue: 0) + as int); + + @override + _i7.ThemeMode get selectedTheme => + (super.noSuchMethod( + Invocation.getter(#selectedTheme), + returnValue: _i7.ThemeMode.system, + ) + as _i7.ThemeMode); + + @override + String get selectedLanguage => + (super.noSuchMethod( + Invocation.getter(#selectedLanguage), + returnValue: _i8.dummyValue( + this, + Invocation.getter(#selectedLanguage), + ), + ) + as String); + + @override + int get selectedThemeNumber => + (super.noSuchMethod( + Invocation.getter(#selectedThemeNumber), + returnValue: 0, + ) + as int); + + @override + int get selectedLanguageNumber => + (super.noSuchMethod( + Invocation.getter(#selectedLanguageNumber), + returnValue: 0, + ) + as int); + + @override + bool get overrideSslCheck => + (super.noSuchMethod( + Invocation.getter(#overrideSslCheck), + returnValue: false, + ) + as bool); + + @override + bool get reducedDataCharts => + (super.noSuchMethod( + Invocation.getter(#reducedDataCharts), + returnValue: false, + ) + as bool); + + @override + double get logsPerQuery => + (super.noSuchMethod(Invocation.getter(#logsPerQuery), returnValue: 0.0) + as double); + + @override + bool get biometricsSupport => + (super.noSuchMethod( + Invocation.getter(#biometricsSupport), + returnValue: false, + ) + as bool); + + @override + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); + + @override + bool get appUnlocked => + (super.noSuchMethod(Invocation.getter(#appUnlocked), returnValue: false) + as bool); + + @override + bool get validVibrator => + (super.noSuchMethod(Invocation.getter(#validVibrator), returnValue: false) + as bool); + + @override + bool get importantInfoReaden => + (super.noSuchMethod( + Invocation.getter(#importantInfoReaden), + returnValue: false, + ) + as bool); + + @override + bool get hideZeroValues => + (super.noSuchMethod( + Invocation.getter(#hideZeroValues), + returnValue: false, + ) + as bool); + + @override + int get statisticsVisualizationMode => + (super.noSuchMethod( + Invocation.getter(#statisticsVisualizationMode), + returnValue: 0, + ) + as int); + + @override + bool get sendCrashReports => + (super.noSuchMethod( + Invocation.getter(#sendCrashReports), + returnValue: false, + ) + as bool); + + @override + List<_i9.AppLog> get logs => + (super.noSuchMethod(Invocation.getter(#logs), returnValue: <_i9.AppLog>[]) + as List<_i9.AppLog>); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); + + @override + void setShowingSnackbar(bool? status) => super.noSuchMethod( + Invocation.method(#setShowingSnackbar, [status]), + returnValueForMissingStub: null, + ); + + @override + void setSelectedTab(int? selectedTab) => super.noSuchMethod( + Invocation.method(#setSelectedTab, [selectedTab]), + returnValueForMissingStub: null, + ); + + @override + void setAppInfo(_i10.PackageInfo? appInfo) => super.noSuchMethod( + Invocation.method(#setAppInfo, [appInfo]), + returnValueForMissingStub: null, + ); + + @override + void setAndroidInfo(_i11.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( + Invocation.method(#setAndroidInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); + + @override + void setIosInfo(_i11.IosDeviceInfo? deviceInfo) => super.noSuchMethod( + Invocation.method(#setIosInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); + + @override + void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( + Invocation.method(#setBiometricsSupport, [isSupported]), + returnValueForMissingStub: null, + ); + + @override + void setAppUnlocked(bool? status) => super.noSuchMethod( + Invocation.method(#setAppUnlocked, [status]), + returnValueForMissingStub: null, + ); + + @override + void setValidVibrator(bool? valid) => super.noSuchMethod( + Invocation.method(#setValidVibrator, [valid]), + returnValueForMissingStub: null, + ); + + @override + void addLog(_i9.AppLog? log) => super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValueForMissingStub: null, + ); + + @override + void setSelectedSettingsScreen({required int? screen, bool? notify}) => + super.noSuchMethod( + Invocation.method(#setSelectedSettingsScreen, [], { + #screen: screen, + #notify: notify, + }), + returnValueForMissingStub: null, + ); + + @override + _i12.Future setUseBiometrics(bool? biometrics) => + (super.noSuchMethod( + Invocation.method(#setUseBiometrics, [biometrics]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setImportantInfoReaden(bool? status) => + (super.noSuchMethod( + Invocation.method(#setImportantInfoReaden, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setPassCode(String? code) => + (super.noSuchMethod( + Invocation.method(#setPassCode, [code]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setAutoRefreshTime(int? seconds) => + (super.noSuchMethod( + Invocation.method(#setAutoRefreshTime, [seconds]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setLogsPerQuery(double? time) => + (super.noSuchMethod( + Invocation.method(#setLogsPerQuery, [time]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setSendCrashReports(bool? status) => + (super.noSuchMethod( + Invocation.method(#setSendCrashReports, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + void saveFromDb(_i13.AppDbData? dbData) => super.noSuchMethod( + Invocation.method(#saveFromDb, [dbData]), + returnValueForMissingStub: null, + ); + + @override + _i12.Future setOverrideSslCheck(bool? status) => + (super.noSuchMethod( + Invocation.method(#setOverrideSslCheck, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setReducedDataCharts(bool? status) => + (super.noSuchMethod( + Invocation.method(#setReducedDataCharts, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setHideZeroValues(bool? status) => + (super.noSuchMethod( + Invocation.method(#setHideZeroValues, [status]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setSelectedTheme(int? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedTheme, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setSelectedLanguage(String? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedLanguage, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setStatisticsVisualizationMode(int? value) => + (super.noSuchMethod( + Invocation.method(#setStatisticsVisualizationMode, [value]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future restoreAppConfig() => + (super.noSuchMethod( + Invocation.method(#restoreAppConfig, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void dispose() => super.noSuchMethod( + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); + + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [ServersProvider]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockServersProvider extends _i1.Mock implements _i15.ServersProvider { + MockServersProvider() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); + + @override + List<_i3.Server> get getServersList => + (super.noSuchMethod( + Invocation.getter(#getServersList), + returnValue: <_i3.Server>[], + ) + as List<_i3.Server>); + + @override + int get numShown => + (super.noSuchMethod(Invocation.getter(#numShown), returnValue: 0) as int); + + @override + List<_i16.QueryStatus> get queryStatuses => + (super.noSuchMethod( + Invocation.getter(#queryStatuses), + returnValue: <_i16.QueryStatus>[], + ) + as List<_i16.QueryStatus>); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); + + @override + void update(_i6.AppConfigProvider? provider) => super.noSuchMethod( + Invocation.method(#update, [provider]), + returnValueForMissingStub: null, + ); + + @override + _i17.ApiGateway? loadApiGateway(_i3.Server? server) => + (super.noSuchMethod(Invocation.method(#loadApiGateway, [server])) + as _i17.ApiGateway?); + + @override + _i16.QueryStatus? getQueryStatus(String? key) => + (super.noSuchMethod(Invocation.method(#getQueryStatus, [key])) + as _i16.QueryStatus?); + + @override + _i16.QueryStatus? findQueryStatus(String? key) => + (super.noSuchMethod(Invocation.method(#findQueryStatus, [key])) + as _i16.QueryStatus?); + + @override + _i12.Future addServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#addServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future editServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#editServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future removeServer(String? serverAddress) => + (super.noSuchMethod( + Invocation.method(#removeServer, [serverAddress]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future setDefaultServer(_i3.Server? server) => + (super.noSuchMethod( + Invocation.method(#setDefaultServer, [server]), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future saveFromDb(List<_i13.ServerDbData>? servers) => + (super.noSuchMethod( + Invocation.method(#saveFromDb, [servers]), + returnValue: _i12.Future.value(), + ) + as _i12.Future); + + @override + _i12.FutureOr> checkUrlExists(String? url) => + (super.noSuchMethod( + Invocation.method(#checkUrlExists, [url]), + returnValue: _i12.Future>.value( + {}, + ), + ) + as _i12.FutureOr>); + + @override + void setselectedServer({required _i3.Server? server, bool? toHomeTab}) => + super.noSuchMethod( + Invocation.method(#setselectedServer, [], { + #server: server, + #toHomeTab: toHomeTab, + }), + returnValueForMissingStub: null, + ); + + @override + void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( + Invocation.method(#updateselectedServerStatus, [enabled]), + returnValueForMissingStub: null, + ); + + @override + _i12.Future deleteDbData() => + (super.noSuchMethod( + Invocation.method(#deleteDbData, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + _i12.Future resetSelectedServer() => + (super.noSuchMethod( + Invocation.method(#resetSelectedServer, []), + returnValue: _i12.Future.value(false), + ) + as _i12.Future); + + @override + void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void dispose() => super.noSuchMethod( + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); + + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [ApiGatewayV5]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockApiGatewayV5 extends _i1.Mock implements _i18.ApiGatewayV5 { + MockApiGatewayV5() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Server get server => + (super.noSuchMethod( + Invocation.getter(#server), + returnValue: _FakeServer_1(this, Invocation.getter(#server)), + ) + as _i3.Server); + + @override + bool checkBasicAuth(String? username, String? password) => + (super.noSuchMethod( + Invocation.method(#checkBasicAuth, [username, password]), + returnValue: false, + ) + as bool); + + @override + _i12.Future<_i4.Response> httpClient({ + required String? method, + required String? url, + Map? headers, + Map? body, + int? timeout = 10, + Map? basicAuth, + }) => + (super.noSuchMethod( + Invocation.method(#httpClient, [], { + #method: method, + #url: url, + #headers: headers, + #body: body, + #timeout: timeout, + #basicAuth: basicAuth, + }), + returnValue: _i12.Future<_i4.Response>.value( + _FakeResponse_2( + this, + Invocation.method(#httpClient, [], { + #method: method, + #url: url, + #headers: headers, + #body: body, + #timeout: timeout, + #basicAuth: basicAuth, + }), + ), + ), + ) + as _i12.Future<_i4.Response>); + + @override + _i12.Future<_i5.LoginQueryResponse> loginQuery({bool? refresh = false}) => + (super.noSuchMethod( + Invocation.method(#loginQuery, [], {#refresh: refresh}), + returnValue: _i12.Future<_i5.LoginQueryResponse>.value( + _FakeLoginQueryResponse_3( + this, + Invocation.method(#loginQuery, [], {#refresh: refresh}), + ), + ), + ) + as _i12.Future<_i5.LoginQueryResponse>); + + @override + _i12.Future<_i5.RealtimeStatusResponse> realtimeStatus() => + (super.noSuchMethod( + Invocation.method(#realtimeStatus, []), + returnValue: _i12.Future<_i5.RealtimeStatusResponse>.value( + _FakeRealtimeStatusResponse_4( + this, + Invocation.method(#realtimeStatus, []), + ), + ), + ) + as _i12.Future<_i5.RealtimeStatusResponse>); + + @override + _i12.Future<_i5.DisableServerResponse> disableServerRequest(int? time) => + (super.noSuchMethod( + Invocation.method(#disableServerRequest, [time]), + returnValue: _i12.Future<_i5.DisableServerResponse>.value( + _FakeDisableServerResponse_5( + this, + Invocation.method(#disableServerRequest, [time]), + ), + ), + ) + as _i12.Future<_i5.DisableServerResponse>); + + @override + _i12.Future<_i5.EnableServerResponse> enableServerRequest() => + (super.noSuchMethod( + Invocation.method(#enableServerRequest, []), + returnValue: _i12.Future<_i5.EnableServerResponse>.value( + _FakeEnableServerResponse_6( + this, + Invocation.method(#enableServerRequest, []), + ), + ), + ) + as _i12.Future<_i5.EnableServerResponse>); + + @override + _i12.Future<_i5.FetchOverTimeDataResponse> fetchOverTimeData() => + (super.noSuchMethod( + Invocation.method(#fetchOverTimeData, []), + returnValue: _i12.Future<_i5.FetchOverTimeDataResponse>.value( + _FakeFetchOverTimeDataResponse_7( + this, + Invocation.method(#fetchOverTimeData, []), + ), + ), + ) + as _i12.Future<_i5.FetchOverTimeDataResponse>); + + @override + _i12.Future<_i5.FetchLogsResponse> fetchLogs( + DateTime? from, + DateTime? until, + ) => + (super.noSuchMethod( + Invocation.method(#fetchLogs, [from, until]), + returnValue: _i12.Future<_i5.FetchLogsResponse>.value( + _FakeFetchLogsResponse_8( + this, + Invocation.method(#fetchLogs, [from, until]), + ), + ), + ) + as _i12.Future<_i5.FetchLogsResponse>); + + @override + _i12.Future<_i5.SetWhiteBlacklistResponse> setWhiteBlacklist( + String? domain, + String? list, + ) => + (super.noSuchMethod( + Invocation.method(#setWhiteBlacklist, [domain, list]), + returnValue: _i12.Future<_i5.SetWhiteBlacklistResponse>.value( + _FakeSetWhiteBlacklistResponse_9( + this, + Invocation.method(#setWhiteBlacklist, [domain, list]), + ), + ), + ) + as _i12.Future<_i5.SetWhiteBlacklistResponse>); + + @override + _i12.Future<_i5.GetDomainLists> getDomainLists() => + (super.noSuchMethod( + Invocation.method(#getDomainLists, []), + returnValue: _i12.Future<_i5.GetDomainLists>.value( + _FakeGetDomainLists_10( + this, + Invocation.method(#getDomainLists, []), + ), + ), + ) + as _i12.Future<_i5.GetDomainLists>); + + @override + _i12.Future<_i5.RemoveDomainFromListResponse> removeDomainFromList( + _i19.Domain? domain, + ) => + (super.noSuchMethod( + Invocation.method(#removeDomainFromList, [domain]), + returnValue: _i12.Future<_i5.RemoveDomainFromListResponse>.value( + _FakeRemoveDomainFromListResponse_11( + this, + Invocation.method(#removeDomainFromList, [domain]), + ), + ), + ) + as _i12.Future<_i5.RemoveDomainFromListResponse>); + + @override + _i12.Future<_i5.AddDomainToListResponse> addDomainToList( + Map? domainData, + ) => + (super.noSuchMethod( + Invocation.method(#addDomainToList, [domainData]), + returnValue: _i12.Future<_i5.AddDomainToListResponse>.value( + _FakeAddDomainToListResponse_12( + this, + Invocation.method(#addDomainToList, [domainData]), + ), + ), + ) + as _i12.Future<_i5.AddDomainToListResponse>); +} diff --git a/test/widgets/settings/app_settings/advanced_options_test.dart b/test/widgets/screens/settings/app_settings/advanced_options_test.dart similarity index 99% rename from test/widgets/settings/app_settings/advanced_options_test.dart rename to test/widgets/screens/settings/app_settings/advanced_options_test.dart index 316fad18..5c94acc1 100644 --- a/test/widgets/settings/app_settings/advanced_options_test.dart +++ b/test/widgets/screens/settings/app_settings/advanced_options_test.dart @@ -13,7 +13,7 @@ import 'package:pi_hole_client/providers/servers_provider.dart'; import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/advanced_options.dart'; import 'package:provider/provider.dart'; -import './advanced_options_test.mocks.dart'; +import 'advanced_options_test.mocks.dart'; @GenerateMocks( [AppConfigProvider, ServersProvider], diff --git a/test/widgets/screens/settings/app_settings/advanced_options_test.mocks.dart b/test/widgets/screens/settings/app_settings/advanced_options_test.mocks.dart new file mode 100644 index 00000000..f96fc2f5 --- /dev/null +++ b/test/widgets/screens/settings/app_settings/advanced_options_test.mocks.dart @@ -0,0 +1,558 @@ +// Mocks generated by Mockito 5.4.5 from annotations +// in pi_hole_client/test/widgets/screens/settings/app_settings/advanced_options_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i9; +import 'dart:ui' as _i11; + +import 'package:device_info_plus/device_info_plus.dart' as _i8; +import 'package:flutter/material.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i5; +import 'package:package_info_plus/package_info_plus.dart' as _i7; +import 'package:pi_hole_client/config/theme.dart' as _i2; +import 'package:pi_hole_client/gateways/api_gateway_interface.dart' as _i15; +import 'package:pi_hole_client/models/app_log.dart' as _i6; +import 'package:pi_hole_client/models/query_status.dart' as _i14; +import 'package:pi_hole_client/models/repository/database.dart' as _i10; +import 'package:pi_hole_client/models/server.dart' as _i13; +import 'package:pi_hole_client/providers/app_config_provider.dart' as _i3; +import 'package:pi_hole_client/providers/servers_provider.dart' as _i12; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: must_be_immutable +// 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 _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { + _FakeAppColors_0(Object parent, Invocation parentInvocation) + : super(parent, parentInvocation); +} + +/// A class which mocks [AppConfigProvider]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockAppConfigProvider extends _i1.Mock implements _i3.AppConfigProvider { + MockAppConfigProvider() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); + + @override + bool get showingSnackbar => + (super.noSuchMethod( + Invocation.getter(#showingSnackbar), + returnValue: false, + ) + as bool); + + @override + int get selectedTab => + (super.noSuchMethod(Invocation.getter(#selectedTab), returnValue: 0) + as int); + + @override + _i4.ThemeMode get selectedTheme => + (super.noSuchMethod( + Invocation.getter(#selectedTheme), + returnValue: _i4.ThemeMode.system, + ) + as _i4.ThemeMode); + + @override + String get selectedLanguage => + (super.noSuchMethod( + Invocation.getter(#selectedLanguage), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#selectedLanguage), + ), + ) + as String); + + @override + int get selectedThemeNumber => + (super.noSuchMethod( + Invocation.getter(#selectedThemeNumber), + returnValue: 0, + ) + as int); + + @override + int get selectedLanguageNumber => + (super.noSuchMethod( + Invocation.getter(#selectedLanguageNumber), + returnValue: 0, + ) + as int); + + @override + bool get overrideSslCheck => + (super.noSuchMethod( + Invocation.getter(#overrideSslCheck), + returnValue: false, + ) + as bool); + + @override + bool get reducedDataCharts => + (super.noSuchMethod( + Invocation.getter(#reducedDataCharts), + returnValue: false, + ) + as bool); + + @override + double get logsPerQuery => + (super.noSuchMethod(Invocation.getter(#logsPerQuery), returnValue: 0.0) + as double); + + @override + bool get biometricsSupport => + (super.noSuchMethod( + Invocation.getter(#biometricsSupport), + returnValue: false, + ) + as bool); + + @override + bool get useBiometrics => + (super.noSuchMethod(Invocation.getter(#useBiometrics), returnValue: false) + as bool); + + @override + bool get appUnlocked => + (super.noSuchMethod(Invocation.getter(#appUnlocked), returnValue: false) + as bool); + + @override + bool get validVibrator => + (super.noSuchMethod(Invocation.getter(#validVibrator), returnValue: false) + as bool); + + @override + bool get importantInfoReaden => + (super.noSuchMethod( + Invocation.getter(#importantInfoReaden), + returnValue: false, + ) + as bool); + + @override + bool get hideZeroValues => + (super.noSuchMethod( + Invocation.getter(#hideZeroValues), + returnValue: false, + ) + as bool); + + @override + int get statisticsVisualizationMode => + (super.noSuchMethod( + Invocation.getter(#statisticsVisualizationMode), + returnValue: 0, + ) + as int); + + @override + bool get sendCrashReports => + (super.noSuchMethod( + Invocation.getter(#sendCrashReports), + returnValue: false, + ) + as bool); + + @override + List<_i6.AppLog> get logs => + (super.noSuchMethod(Invocation.getter(#logs), returnValue: <_i6.AppLog>[]) + as List<_i6.AppLog>); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); + + @override + void setShowingSnackbar(bool? status) => super.noSuchMethod( + Invocation.method(#setShowingSnackbar, [status]), + returnValueForMissingStub: null, + ); + + @override + void setSelectedTab(int? selectedTab) => super.noSuchMethod( + Invocation.method(#setSelectedTab, [selectedTab]), + returnValueForMissingStub: null, + ); + + @override + void setAppInfo(_i7.PackageInfo? appInfo) => super.noSuchMethod( + Invocation.method(#setAppInfo, [appInfo]), + returnValueForMissingStub: null, + ); + + @override + void setAndroidInfo(_i8.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( + Invocation.method(#setAndroidInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); + + @override + void setIosInfo(_i8.IosDeviceInfo? deviceInfo) => super.noSuchMethod( + Invocation.method(#setIosInfo, [deviceInfo]), + returnValueForMissingStub: null, + ); + + @override + void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( + Invocation.method(#setBiometricsSupport, [isSupported]), + returnValueForMissingStub: null, + ); + + @override + void setAppUnlocked(bool? status) => super.noSuchMethod( + Invocation.method(#setAppUnlocked, [status]), + returnValueForMissingStub: null, + ); + + @override + void setValidVibrator(bool? valid) => super.noSuchMethod( + Invocation.method(#setValidVibrator, [valid]), + returnValueForMissingStub: null, + ); + + @override + void addLog(_i6.AppLog? log) => super.noSuchMethod( + Invocation.method(#addLog, [log]), + returnValueForMissingStub: null, + ); + + @override + void setSelectedSettingsScreen({required int? screen, bool? notify}) => + super.noSuchMethod( + Invocation.method(#setSelectedSettingsScreen, [], { + #screen: screen, + #notify: notify, + }), + returnValueForMissingStub: null, + ); + + @override + _i9.Future setUseBiometrics(bool? biometrics) => + (super.noSuchMethod( + Invocation.method(#setUseBiometrics, [biometrics]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setImportantInfoReaden(bool? status) => + (super.noSuchMethod( + Invocation.method(#setImportantInfoReaden, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setPassCode(String? code) => + (super.noSuchMethod( + Invocation.method(#setPassCode, [code]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setAutoRefreshTime(int? seconds) => + (super.noSuchMethod( + Invocation.method(#setAutoRefreshTime, [seconds]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setLogsPerQuery(double? time) => + (super.noSuchMethod( + Invocation.method(#setLogsPerQuery, [time]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setSendCrashReports(bool? status) => + (super.noSuchMethod( + Invocation.method(#setSendCrashReports, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + void saveFromDb(_i10.AppDbData? dbData) => super.noSuchMethod( + Invocation.method(#saveFromDb, [dbData]), + returnValueForMissingStub: null, + ); + + @override + _i9.Future setOverrideSslCheck(bool? status) => + (super.noSuchMethod( + Invocation.method(#setOverrideSslCheck, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setReducedDataCharts(bool? status) => + (super.noSuchMethod( + Invocation.method(#setReducedDataCharts, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setHideZeroValues(bool? status) => + (super.noSuchMethod( + Invocation.method(#setHideZeroValues, [status]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setSelectedTheme(int? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedTheme, [value]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setSelectedLanguage(String? value) => + (super.noSuchMethod( + Invocation.method(#setSelectedLanguage, [value]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setStatisticsVisualizationMode(int? value) => + (super.noSuchMethod( + Invocation.method(#setStatisticsVisualizationMode, [value]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future restoreAppConfig() => + (super.noSuchMethod( + Invocation.method(#restoreAppConfig, []), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void dispose() => super.noSuchMethod( + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); + + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [ServersProvider]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockServersProvider extends _i1.Mock implements _i12.ServersProvider { + MockServersProvider() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.AppColors get colors => + (super.noSuchMethod( + Invocation.getter(#colors), + returnValue: _FakeAppColors_0(this, Invocation.getter(#colors)), + ) + as _i2.AppColors); + + @override + List<_i13.Server> get getServersList => + (super.noSuchMethod( + Invocation.getter(#getServersList), + returnValue: <_i13.Server>[], + ) + as List<_i13.Server>); + + @override + int get numShown => + (super.noSuchMethod(Invocation.getter(#numShown), returnValue: 0) as int); + + @override + List<_i14.QueryStatus> get queryStatuses => + (super.noSuchMethod( + Invocation.getter(#queryStatuses), + returnValue: <_i14.QueryStatus>[], + ) + as List<_i14.QueryStatus>); + + @override + bool get hasListeners => + (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) + as bool); + + @override + void update(_i3.AppConfigProvider? provider) => super.noSuchMethod( + Invocation.method(#update, [provider]), + returnValueForMissingStub: null, + ); + + @override + _i15.ApiGateway? loadApiGateway(_i13.Server? server) => + (super.noSuchMethod(Invocation.method(#loadApiGateway, [server])) + as _i15.ApiGateway?); + + @override + _i14.QueryStatus? getQueryStatus(String? key) => + (super.noSuchMethod(Invocation.method(#getQueryStatus, [key])) + as _i14.QueryStatus?); + + @override + _i14.QueryStatus? findQueryStatus(String? key) => + (super.noSuchMethod(Invocation.method(#findQueryStatus, [key])) + as _i14.QueryStatus?); + + @override + _i9.Future addServer(_i13.Server? server) => + (super.noSuchMethod( + Invocation.method(#addServer, [server]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future editServer(_i13.Server? server) => + (super.noSuchMethod( + Invocation.method(#editServer, [server]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future removeServer(String? serverAddress) => + (super.noSuchMethod( + Invocation.method(#removeServer, [serverAddress]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future setDefaultServer(_i13.Server? server) => + (super.noSuchMethod( + Invocation.method(#setDefaultServer, [server]), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future saveFromDb(List<_i10.ServerDbData>? servers) => + (super.noSuchMethod( + Invocation.method(#saveFromDb, [servers]), + returnValue: _i9.Future.value(), + ) + as _i9.Future); + + @override + _i9.FutureOr> checkUrlExists(String? url) => + (super.noSuchMethod( + Invocation.method(#checkUrlExists, [url]), + returnValue: _i9.Future>.value( + {}, + ), + ) + as _i9.FutureOr>); + + @override + void setselectedServer({required _i13.Server? server, bool? toHomeTab}) => + super.noSuchMethod( + Invocation.method(#setselectedServer, [], { + #server: server, + #toHomeTab: toHomeTab, + }), + returnValueForMissingStub: null, + ); + + @override + void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( + Invocation.method(#updateselectedServerStatus, [enabled]), + returnValueForMissingStub: null, + ); + + @override + _i9.Future deleteDbData() => + (super.noSuchMethod( + Invocation.method(#deleteDbData, []), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + _i9.Future resetSelectedServer() => + (super.noSuchMethod( + Invocation.method(#resetSelectedServer, []), + returnValue: _i9.Future.value(false), + ) + as _i9.Future); + + @override + void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#addListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( + Invocation.method(#removeListener, [listener]), + returnValueForMissingStub: null, + ); + + @override + void dispose() => super.noSuchMethod( + Invocation.method(#dispose, []), + returnValueForMissingStub: null, + ); + + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method(#notifyListeners, []), + returnValueForMissingStub: null, + ); +} diff --git a/test/widgets/settings/app_settings/advanced_settings/advanced_options_test.dart b/test/widgets/screens/settings/app_settings/advanced_settings/advanced_options_test.dart similarity index 99% rename from test/widgets/settings/app_settings/advanced_settings/advanced_options_test.dart rename to test/widgets/screens/settings/app_settings/advanced_settings/advanced_options_test.dart index c9ed0bb3..e8fbb1c8 100644 --- a/test/widgets/settings/app_settings/advanced_settings/advanced_options_test.dart +++ b/test/widgets/screens/settings/app_settings/advanced_settings/advanced_options_test.dart @@ -6,7 +6,7 @@ import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/a import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/reset_modal.dart'; import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/statistics_visualization_screen.dart'; -import '../../../helpers.dart'; +import '../../../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/settings/app_settings/advanced_settings/app_unlock_setup_modal_test.dart b/test/widgets/screens/settings/app_settings/advanced_settings/app_unlock_setup_modal_test.dart similarity index 99% rename from test/widgets/settings/app_settings/advanced_settings/app_unlock_setup_modal_test.dart rename to test/widgets/screens/settings/app_settings/advanced_settings/app_unlock_setup_modal_test.dart index 70e34247..7f7353b9 100644 --- a/test/widgets/settings/app_settings/advanced_settings/app_unlock_setup_modal_test.dart +++ b/test/widgets/screens/settings/app_settings/advanced_settings/app_unlock_setup_modal_test.dart @@ -7,7 +7,7 @@ import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/a import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/app_unlock_setup_modal.dart'; import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/enter_passcode_modal.dart'; -import '../../../helpers.dart'; +import '../../../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/settings/app_settings/advanced_settings/reset_modal_test.dart b/test/widgets/screens/settings/app_settings/advanced_settings/reset_modal_test.dart similarity index 98% rename from test/widgets/settings/app_settings/advanced_settings/reset_modal_test.dart rename to test/widgets/screens/settings/app_settings/advanced_settings/reset_modal_test.dart index 0176777e..bbd780b2 100644 --- a/test/widgets/settings/app_settings/advanced_settings/reset_modal_test.dart +++ b/test/widgets/screens/settings/app_settings/advanced_settings/reset_modal_test.dart @@ -3,7 +3,7 @@ import 'package:flutter_phoenix/flutter_phoenix.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/advanced_options.dart'; -import '../../../helpers.dart'; +import '../../../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/settings/app_settings/advanced_settings/statistics_visualization_screen_test.dart b/test/widgets/screens/settings/app_settings/advanced_settings/statistics_visualization_screen_test.dart similarity index 98% rename from test/widgets/settings/app_settings/advanced_settings/statistics_visualization_screen_test.dart rename to test/widgets/screens/settings/app_settings/advanced_settings/statistics_visualization_screen_test.dart index fcf6c417..482e61cf 100644 --- a/test/widgets/settings/app_settings/advanced_settings/statistics_visualization_screen_test.dart +++ b/test/widgets/screens/settings/app_settings/advanced_settings/statistics_visualization_screen_test.dart @@ -3,7 +3,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/advanced_options.dart'; import 'package:pi_hole_client/screens/settings/app_settings/advanced_settings/statistics_visualization_screen.dart'; -import '../../../helpers.dart'; +import '../../../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/settings/app_settings/auto_refresh_time_screen_test.dart b/test/widgets/screens/settings/app_settings/auto_refresh_time_screen_test.dart similarity index 99% rename from test/widgets/settings/app_settings/auto_refresh_time_screen_test.dart rename to test/widgets/screens/settings/app_settings/auto_refresh_time_screen_test.dart index 2dbd50ee..bb83aa63 100644 --- a/test/widgets/settings/app_settings/auto_refresh_time_screen_test.dart +++ b/test/widgets/screens/settings/app_settings/auto_refresh_time_screen_test.dart @@ -3,7 +3,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; import 'package:pi_hole_client/screens/settings/app_settings/auto_refresh_time_screen.dart'; -import '../../helpers.dart'; +import '../../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/settings/settings_test.dart b/test/widgets/screens/settings/settings_test.dart similarity index 99% rename from test/widgets/settings/settings_test.dart rename to test/widgets/screens/settings/settings_test.dart index a1eb8827..315d995e 100644 --- a/test/widgets/settings/settings_test.dart +++ b/test/widgets/screens/settings/settings_test.dart @@ -16,7 +16,7 @@ import 'package:pi_hole_client/screens/settings/app_settings/logs_quantity_load_ import 'package:pi_hole_client/screens/settings/app_settings/theme_screen.dart'; import 'package:pi_hole_client/screens/settings/settings.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/statistics/statistics_test.dart b/test/widgets/screens/statistics/statistics_test.dart similarity index 99% rename from test/widgets/statistics/statistics_test.dart rename to test/widgets/screens/statistics/statistics_test.dart index 5a5f74e0..55fbbf8a 100644 --- a/test/widgets/statistics/statistics_test.dart +++ b/test/widgets/screens/statistics/statistics_test.dart @@ -4,7 +4,7 @@ import 'package:pi_hole_client/screens/statistics/statistics.dart'; import 'package:pi_hole_client/screens/statistics/statistics_list.dart'; import 'package:pie_chart/pie_chart.dart'; -import '../helpers.dart'; +import '../../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/unlock_test.dart b/test/widgets/screens/unlock_test.dart similarity index 98% rename from test/widgets/unlock_test.dart rename to test/widgets/screens/unlock_test.dart index e86b0ca4..c9a16aca 100644 --- a/test/widgets/unlock_test.dart +++ b/test/widgets/screens/unlock_test.dart @@ -3,7 +3,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:pi_hole_client/screens/unlock.dart'; import 'package:pi_hole_client/widgets/numeric_pad.dart'; -import './helpers.dart'; +import '../helpers.dart'; void main() async { await initializeApp(); diff --git a/test/widgets/utils.dart b/test/widgets/screens/utils.dart similarity index 100% rename from test/widgets/utils.dart rename to test/widgets/screens/utils.dart diff --git a/test/widgets/servers/add_server_fullscreen_test.mocks.dart b/test/widgets/servers/add_server_fullscreen_test.mocks.dart deleted file mode 100644 index c18f1a5e..00000000 --- a/test/widgets/servers/add_server_fullscreen_test.mocks.dart +++ /dev/null @@ -1,1048 +0,0 @@ -// Mocks generated by Mockito 5.4.5 from annotations -// in pi_hole_client/test/widgets/servers/add_server_fullscreen_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i12; -import 'dart:ui' as _i14; - -import 'package:device_info_plus/device_info_plus.dart' as _i11; -import 'package:flutter/material.dart' as _i7; -import 'package:http/http.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i8; -import 'package:package_info_plus/package_info_plus.dart' as _i10; -import 'package:pi_hole_client/config/theme.dart' as _i2; -import 'package:pi_hole_client/gateways/api_gateway_interface.dart' as _i17; -import 'package:pi_hole_client/gateways/v5/api_gateway_v5.dart' as _i18; -import 'package:pi_hole_client/models/app_log.dart' as _i9; -import 'package:pi_hole_client/models/domain.dart' as _i19; -import 'package:pi_hole_client/models/gateways.dart' as _i5; -import 'package:pi_hole_client/models/query_status.dart' as _i16; -import 'package:pi_hole_client/models/repository/database.dart' as _i13; -import 'package:pi_hole_client/models/server.dart' as _i3; -import 'package:pi_hole_client/providers/app_config_provider.dart' as _i6; -import 'package:pi_hole_client/providers/servers_provider.dart' as _i15; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable -// 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 _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { - _FakeAppColors_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeServer_1 extends _i1.SmartFake implements _i3.Server { - _FakeServer_1( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeResponse_2 extends _i1.SmartFake implements _i4.Response { - _FakeResponse_2( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeLoginQueryResponse_3 extends _i1.SmartFake - implements _i5.LoginQueryResponse { - _FakeLoginQueryResponse_3( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeRealtimeStatusResponse_4 extends _i1.SmartFake - implements _i5.RealtimeStatusResponse { - _FakeRealtimeStatusResponse_4( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDisableServerResponse_5 extends _i1.SmartFake - implements _i5.DisableServerResponse { - _FakeDisableServerResponse_5( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeEnableServerResponse_6 extends _i1.SmartFake - implements _i5.EnableServerResponse { - _FakeEnableServerResponse_6( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFetchOverTimeDataResponse_7 extends _i1.SmartFake - implements _i5.FetchOverTimeDataResponse { - _FakeFetchOverTimeDataResponse_7( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeFetchLogsResponse_8 extends _i1.SmartFake - implements _i5.FetchLogsResponse { - _FakeFetchLogsResponse_8( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeSetWhiteBlacklistResponse_9 extends _i1.SmartFake - implements _i5.SetWhiteBlacklistResponse { - _FakeSetWhiteBlacklistResponse_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeGetDomainLists_10 extends _i1.SmartFake - implements _i5.GetDomainLists { - _FakeGetDomainLists_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeRemoveDomainFromListResponse_11 extends _i1.SmartFake - implements _i5.RemoveDomainFromListResponse { - _FakeRemoveDomainFromListResponse_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAddDomainToListResponse_12 extends _i1.SmartFake - implements _i5.AddDomainToListResponse { - _FakeAddDomainToListResponse_12( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [AppConfigProvider]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockAppConfigProvider extends _i1.Mock implements _i6.AppConfigProvider { - MockAppConfigProvider() { - _i1.throwOnMissingStub(this); - } - - @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); - - @override - bool get showingSnackbar => (super.noSuchMethod( - Invocation.getter(#showingSnackbar), - returnValue: false, - ) as bool); - - @override - int get selectedTab => (super.noSuchMethod( - Invocation.getter(#selectedTab), - returnValue: 0, - ) as int); - - @override - _i7.ThemeMode get selectedTheme => (super.noSuchMethod( - Invocation.getter(#selectedTheme), - returnValue: _i7.ThemeMode.system, - ) as _i7.ThemeMode); - - @override - String get selectedLanguage => (super.noSuchMethod( - Invocation.getter(#selectedLanguage), - returnValue: _i8.dummyValue( - this, - Invocation.getter(#selectedLanguage), - ), - ) as String); - - @override - int get selectedThemeNumber => (super.noSuchMethod( - Invocation.getter(#selectedThemeNumber), - returnValue: 0, - ) as int); - - @override - int get selectedLanguageNumber => (super.noSuchMethod( - Invocation.getter(#selectedLanguageNumber), - returnValue: 0, - ) as int); - - @override - bool get overrideSslCheck => (super.noSuchMethod( - Invocation.getter(#overrideSslCheck), - returnValue: false, - ) as bool); - - @override - bool get reducedDataCharts => (super.noSuchMethod( - Invocation.getter(#reducedDataCharts), - returnValue: false, - ) as bool); - - @override - double get logsPerQuery => (super.noSuchMethod( - Invocation.getter(#logsPerQuery), - returnValue: 0.0, - ) as double); - - @override - bool get biometricsSupport => (super.noSuchMethod( - Invocation.getter(#biometricsSupport), - returnValue: false, - ) as bool); - - @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); - - @override - bool get appUnlocked => (super.noSuchMethod( - Invocation.getter(#appUnlocked), - returnValue: false, - ) as bool); - - @override - bool get validVibrator => (super.noSuchMethod( - Invocation.getter(#validVibrator), - returnValue: false, - ) as bool); - - @override - bool get importantInfoReaden => (super.noSuchMethod( - Invocation.getter(#importantInfoReaden), - returnValue: false, - ) as bool); - - @override - bool get hideZeroValues => (super.noSuchMethod( - Invocation.getter(#hideZeroValues), - returnValue: false, - ) as bool); - - @override - int get statisticsVisualizationMode => (super.noSuchMethod( - Invocation.getter(#statisticsVisualizationMode), - returnValue: 0, - ) as int); - - @override - bool get sendCrashReports => (super.noSuchMethod( - Invocation.getter(#sendCrashReports), - returnValue: false, - ) as bool); - - @override - List<_i9.AppLog> get logs => (super.noSuchMethod( - Invocation.getter(#logs), - returnValue: <_i9.AppLog>[], - ) as List<_i9.AppLog>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void setShowingSnackbar(bool? status) => super.noSuchMethod( - Invocation.method( - #setShowingSnackbar, - [status], - ), - returnValueForMissingStub: null, - ); - - @override - void setSelectedTab(int? selectedTab) => super.noSuchMethod( - Invocation.method( - #setSelectedTab, - [selectedTab], - ), - returnValueForMissingStub: null, - ); - - @override - void setAppInfo(_i10.PackageInfo? appInfo) => super.noSuchMethod( - Invocation.method( - #setAppInfo, - [appInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setAndroidInfo(_i11.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setAndroidInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setIosInfo(_i11.IosDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setIosInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( - Invocation.method( - #setBiometricsSupport, - [isSupported], - ), - returnValueForMissingStub: null, - ); - - @override - void setAppUnlocked(bool? status) => super.noSuchMethod( - Invocation.method( - #setAppUnlocked, - [status], - ), - returnValueForMissingStub: null, - ); - - @override - void setValidVibrator(bool? valid) => super.noSuchMethod( - Invocation.method( - #setValidVibrator, - [valid], - ), - returnValueForMissingStub: null, - ); - - @override - void addLog(_i9.AppLog? log) => super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValueForMissingStub: null, - ); - - @override - void setSelectedSettingsScreen({ - required int? screen, - bool? notify, - }) => - super.noSuchMethod( - Invocation.method( - #setSelectedSettingsScreen, - [], - { - #screen: screen, - #notify: notify, - }, - ), - returnValueForMissingStub: null, - ); - - @override - _i12.Future setUseBiometrics(bool? biometrics) => (super.noSuchMethod( - Invocation.method( - #setUseBiometrics, - [biometrics], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setImportantInfoReaden(bool? status) => (super.noSuchMethod( - Invocation.method( - #setImportantInfoReaden, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setPassCode(String? code) => (super.noSuchMethod( - Invocation.method( - #setPassCode, - [code], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setAutoRefreshTime(int? seconds) => (super.noSuchMethod( - Invocation.method( - #setAutoRefreshTime, - [seconds], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setLogsPerQuery(double? time) => (super.noSuchMethod( - Invocation.method( - #setLogsPerQuery, - [time], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setSendCrashReports(bool? status) => (super.noSuchMethod( - Invocation.method( - #setSendCrashReports, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - void saveFromDb(_i13.AppDbData? dbData) => super.noSuchMethod( - Invocation.method( - #saveFromDb, - [dbData], - ), - returnValueForMissingStub: null, - ); - - @override - _i12.Future setOverrideSslCheck(bool? status) => (super.noSuchMethod( - Invocation.method( - #setOverrideSslCheck, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setReducedDataCharts(bool? status) => (super.noSuchMethod( - Invocation.method( - #setReducedDataCharts, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setHideZeroValues(bool? status) => (super.noSuchMethod( - Invocation.method( - #setHideZeroValues, - [status], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setSelectedTheme(int? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedTheme, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setSelectedLanguage(String? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedLanguage, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setStatisticsVisualizationMode(int? value) => - (super.noSuchMethod( - Invocation.method( - #setStatisticsVisualizationMode, - [value], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future restoreAppConfig() => (super.noSuchMethod( - Invocation.method( - #restoreAppConfig, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [ServersProvider]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockServersProvider extends _i1.Mock implements _i15.ServersProvider { - MockServersProvider() { - _i1.throwOnMissingStub(this); - } - - @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); - - @override - List<_i3.Server> get getServersList => (super.noSuchMethod( - Invocation.getter(#getServersList), - returnValue: <_i3.Server>[], - ) as List<_i3.Server>); - - @override - int get numShown => (super.noSuchMethod( - Invocation.getter(#numShown), - returnValue: 0, - ) as int); - - @override - List<_i16.QueryStatus> get queryStatuses => (super.noSuchMethod( - Invocation.getter(#queryStatuses), - returnValue: <_i16.QueryStatus>[], - ) as List<_i16.QueryStatus>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void update(_i6.AppConfigProvider? provider) => super.noSuchMethod( - Invocation.method( - #update, - [provider], - ), - returnValueForMissingStub: null, - ); - - @override - _i17.ApiGateway? loadApiGateway(_i3.Server? server) => - (super.noSuchMethod(Invocation.method( - #loadApiGateway, - [server], - )) as _i17.ApiGateway?); - - @override - _i16.QueryStatus? getQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #getQueryStatus, - [key], - )) as _i16.QueryStatus?); - - @override - _i16.QueryStatus? findQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #findQueryStatus, - [key], - )) as _i16.QueryStatus?); - - @override - _i12.Future addServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #addServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future editServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #editServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future removeServer(String? serverAddress) => (super.noSuchMethod( - Invocation.method( - #removeServer, - [serverAddress], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future setDefaultServer(_i3.Server? server) => (super.noSuchMethod( - Invocation.method( - #setDefaultServer, - [server], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future saveFromDb(List<_i13.ServerDbData>? servers) => - (super.noSuchMethod( - Invocation.method( - #saveFromDb, - [servers], - ), - returnValue: _i12.Future.value(), - ) as _i12.Future); - - @override - _i12.FutureOr> checkUrlExists(String? url) => - (super.noSuchMethod( - Invocation.method( - #checkUrlExists, - [url], - ), - returnValue: - _i12.Future>.value({}), - ) as _i12.FutureOr>); - - @override - void setselectedServer({ - required _i3.Server? server, - bool? toHomeTab, - }) => - super.noSuchMethod( - Invocation.method( - #setselectedServer, - [], - { - #server: server, - #toHomeTab: toHomeTab, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( - Invocation.method( - #updateselectedServerStatus, - [enabled], - ), - returnValueForMissingStub: null, - ); - - @override - _i12.Future deleteDbData() => (super.noSuchMethod( - Invocation.method( - #deleteDbData, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - _i12.Future resetSelectedServer() => (super.noSuchMethod( - Invocation.method( - #resetSelectedServer, - [], - ), - returnValue: _i12.Future.value(false), - ) as _i12.Future); - - @override - void addListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i14.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [ApiGatewayV5]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockApiGatewayV5 extends _i1.Mock implements _i18.ApiGatewayV5 { - MockApiGatewayV5() { - _i1.throwOnMissingStub(this); - } - - @override - _i3.Server get server => (super.noSuchMethod( - Invocation.getter(#server), - returnValue: _FakeServer_1( - this, - Invocation.getter(#server), - ), - ) as _i3.Server); - - @override - bool checkBasicAuth( - String? username, - String? password, - ) => - (super.noSuchMethod( - Invocation.method( - #checkBasicAuth, - [ - username, - password, - ], - ), - returnValue: false, - ) as bool); - - @override - _i12.Future<_i4.Response> httpClient({ - required String? method, - required String? url, - Map? headers, - Map? body, - int? timeout = 10, - Map? basicAuth, - }) => - (super.noSuchMethod( - Invocation.method( - #httpClient, - [], - { - #method: method, - #url: url, - #headers: headers, - #body: body, - #timeout: timeout, - #basicAuth: basicAuth, - }, - ), - returnValue: _i12.Future<_i4.Response>.value(_FakeResponse_2( - this, - Invocation.method( - #httpClient, - [], - { - #method: method, - #url: url, - #headers: headers, - #body: body, - #timeout: timeout, - #basicAuth: basicAuth, - }, - ), - )), - ) as _i12.Future<_i4.Response>); - - @override - _i12.Future<_i5.LoginQueryResponse> loginQuery({bool? refresh = false}) => - (super.noSuchMethod( - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - returnValue: - _i12.Future<_i5.LoginQueryResponse>.value(_FakeLoginQueryResponse_3( - this, - Invocation.method( - #loginQuery, - [], - {#refresh: refresh}, - ), - )), - ) as _i12.Future<_i5.LoginQueryResponse>); - - @override - _i12.Future<_i5.RealtimeStatusResponse> realtimeStatus() => - (super.noSuchMethod( - Invocation.method( - #realtimeStatus, - [], - ), - returnValue: _i12.Future<_i5.RealtimeStatusResponse>.value( - _FakeRealtimeStatusResponse_4( - this, - Invocation.method( - #realtimeStatus, - [], - ), - )), - ) as _i12.Future<_i5.RealtimeStatusResponse>); - - @override - _i12.Future<_i5.DisableServerResponse> disableServerRequest(int? time) => - (super.noSuchMethod( - Invocation.method( - #disableServerRequest, - [time], - ), - returnValue: _i12.Future<_i5.DisableServerResponse>.value( - _FakeDisableServerResponse_5( - this, - Invocation.method( - #disableServerRequest, - [time], - ), - )), - ) as _i12.Future<_i5.DisableServerResponse>); - - @override - _i12.Future<_i5.EnableServerResponse> enableServerRequest() => - (super.noSuchMethod( - Invocation.method( - #enableServerRequest, - [], - ), - returnValue: _i12.Future<_i5.EnableServerResponse>.value( - _FakeEnableServerResponse_6( - this, - Invocation.method( - #enableServerRequest, - [], - ), - )), - ) as _i12.Future<_i5.EnableServerResponse>); - - @override - _i12.Future<_i5.FetchOverTimeDataResponse> fetchOverTimeData() => - (super.noSuchMethod( - Invocation.method( - #fetchOverTimeData, - [], - ), - returnValue: _i12.Future<_i5.FetchOverTimeDataResponse>.value( - _FakeFetchOverTimeDataResponse_7( - this, - Invocation.method( - #fetchOverTimeData, - [], - ), - )), - ) as _i12.Future<_i5.FetchOverTimeDataResponse>); - - @override - _i12.Future<_i5.FetchLogsResponse> fetchLogs( - DateTime? from, - DateTime? until, - ) => - (super.noSuchMethod( - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - returnValue: - _i12.Future<_i5.FetchLogsResponse>.value(_FakeFetchLogsResponse_8( - this, - Invocation.method( - #fetchLogs, - [ - from, - until, - ], - ), - )), - ) as _i12.Future<_i5.FetchLogsResponse>); - - @override - _i12.Future<_i5.SetWhiteBlacklistResponse> setWhiteBlacklist( - String? domain, - String? list, - ) => - (super.noSuchMethod( - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - returnValue: _i12.Future<_i5.SetWhiteBlacklistResponse>.value( - _FakeSetWhiteBlacklistResponse_9( - this, - Invocation.method( - #setWhiteBlacklist, - [ - domain, - list, - ], - ), - )), - ) as _i12.Future<_i5.SetWhiteBlacklistResponse>); - - @override - _i12.Future<_i5.GetDomainLists> getDomainLists() => (super.noSuchMethod( - Invocation.method( - #getDomainLists, - [], - ), - returnValue: - _i12.Future<_i5.GetDomainLists>.value(_FakeGetDomainLists_10( - this, - Invocation.method( - #getDomainLists, - [], - ), - )), - ) as _i12.Future<_i5.GetDomainLists>); - - @override - _i12.Future<_i5.RemoveDomainFromListResponse> removeDomainFromList( - _i19.Domain? domain) => - (super.noSuchMethod( - Invocation.method( - #removeDomainFromList, - [domain], - ), - returnValue: _i12.Future<_i5.RemoveDomainFromListResponse>.value( - _FakeRemoveDomainFromListResponse_11( - this, - Invocation.method( - #removeDomainFromList, - [domain], - ), - )), - ) as _i12.Future<_i5.RemoveDomainFromListResponse>); - - @override - _i12.Future<_i5.AddDomainToListResponse> addDomainToList( - Map? domainData) => - (super.noSuchMethod( - Invocation.method( - #addDomainToList, - [domainData], - ), - returnValue: _i12.Future<_i5.AddDomainToListResponse>.value( - _FakeAddDomainToListResponse_12( - this, - Invocation.method( - #addDomainToList, - [domainData], - ), - )), - ) as _i12.Future<_i5.AddDomainToListResponse>); -} diff --git a/test/widgets/settings/app_settings/advanced_options_test.mocks.dart b/test/widgets/settings/app_settings/advanced_options_test.mocks.dart deleted file mode 100644 index 6e6882f9..00000000 --- a/test/widgets/settings/app_settings/advanced_options_test.mocks.dart +++ /dev/null @@ -1,650 +0,0 @@ -// Mocks generated by Mockito 5.4.5 from annotations -// in pi_hole_client/test/widgets/settings/app_settings/advanced_options_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i9; -import 'dart:ui' as _i11; - -import 'package:device_info_plus/device_info_plus.dart' as _i8; -import 'package:flutter/material.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i5; -import 'package:package_info_plus/package_info_plus.dart' as _i7; -import 'package:pi_hole_client/config/theme.dart' as _i2; -import 'package:pi_hole_client/gateways/api_gateway_interface.dart' as _i15; -import 'package:pi_hole_client/models/app_log.dart' as _i6; -import 'package:pi_hole_client/models/query_status.dart' as _i14; -import 'package:pi_hole_client/models/repository/database.dart' as _i10; -import 'package:pi_hole_client/models/server.dart' as _i13; -import 'package:pi_hole_client/providers/app_config_provider.dart' as _i3; -import 'package:pi_hole_client/providers/servers_provider.dart' as _i12; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: deprecated_member_use -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: must_be_immutable -// 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 _FakeAppColors_0 extends _i1.SmartFake implements _i2.AppColors { - _FakeAppColors_0( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -/// A class which mocks [AppConfigProvider]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockAppConfigProvider extends _i1.Mock implements _i3.AppConfigProvider { - MockAppConfigProvider() { - _i1.throwOnMissingStub(this); - } - - @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); - - @override - bool get showingSnackbar => (super.noSuchMethod( - Invocation.getter(#showingSnackbar), - returnValue: false, - ) as bool); - - @override - int get selectedTab => (super.noSuchMethod( - Invocation.getter(#selectedTab), - returnValue: 0, - ) as int); - - @override - _i4.ThemeMode get selectedTheme => (super.noSuchMethod( - Invocation.getter(#selectedTheme), - returnValue: _i4.ThemeMode.system, - ) as _i4.ThemeMode); - - @override - String get selectedLanguage => (super.noSuchMethod( - Invocation.getter(#selectedLanguage), - returnValue: _i5.dummyValue( - this, - Invocation.getter(#selectedLanguage), - ), - ) as String); - - @override - int get selectedThemeNumber => (super.noSuchMethod( - Invocation.getter(#selectedThemeNumber), - returnValue: 0, - ) as int); - - @override - int get selectedLanguageNumber => (super.noSuchMethod( - Invocation.getter(#selectedLanguageNumber), - returnValue: 0, - ) as int); - - @override - bool get overrideSslCheck => (super.noSuchMethod( - Invocation.getter(#overrideSslCheck), - returnValue: false, - ) as bool); - - @override - bool get reducedDataCharts => (super.noSuchMethod( - Invocation.getter(#reducedDataCharts), - returnValue: false, - ) as bool); - - @override - double get logsPerQuery => (super.noSuchMethod( - Invocation.getter(#logsPerQuery), - returnValue: 0.0, - ) as double); - - @override - bool get biometricsSupport => (super.noSuchMethod( - Invocation.getter(#biometricsSupport), - returnValue: false, - ) as bool); - - @override - bool get useBiometrics => (super.noSuchMethod( - Invocation.getter(#useBiometrics), - returnValue: false, - ) as bool); - - @override - bool get appUnlocked => (super.noSuchMethod( - Invocation.getter(#appUnlocked), - returnValue: false, - ) as bool); - - @override - bool get validVibrator => (super.noSuchMethod( - Invocation.getter(#validVibrator), - returnValue: false, - ) as bool); - - @override - bool get importantInfoReaden => (super.noSuchMethod( - Invocation.getter(#importantInfoReaden), - returnValue: false, - ) as bool); - - @override - bool get hideZeroValues => (super.noSuchMethod( - Invocation.getter(#hideZeroValues), - returnValue: false, - ) as bool); - - @override - int get statisticsVisualizationMode => (super.noSuchMethod( - Invocation.getter(#statisticsVisualizationMode), - returnValue: 0, - ) as int); - - @override - bool get sendCrashReports => (super.noSuchMethod( - Invocation.getter(#sendCrashReports), - returnValue: false, - ) as bool); - - @override - List<_i6.AppLog> get logs => (super.noSuchMethod( - Invocation.getter(#logs), - returnValue: <_i6.AppLog>[], - ) as List<_i6.AppLog>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void setShowingSnackbar(bool? status) => super.noSuchMethod( - Invocation.method( - #setShowingSnackbar, - [status], - ), - returnValueForMissingStub: null, - ); - - @override - void setSelectedTab(int? selectedTab) => super.noSuchMethod( - Invocation.method( - #setSelectedTab, - [selectedTab], - ), - returnValueForMissingStub: null, - ); - - @override - void setAppInfo(_i7.PackageInfo? appInfo) => super.noSuchMethod( - Invocation.method( - #setAppInfo, - [appInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setAndroidInfo(_i8.AndroidDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setAndroidInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setIosInfo(_i8.IosDeviceInfo? deviceInfo) => super.noSuchMethod( - Invocation.method( - #setIosInfo, - [deviceInfo], - ), - returnValueForMissingStub: null, - ); - - @override - void setBiometricsSupport(bool? isSupported) => super.noSuchMethod( - Invocation.method( - #setBiometricsSupport, - [isSupported], - ), - returnValueForMissingStub: null, - ); - - @override - void setAppUnlocked(bool? status) => super.noSuchMethod( - Invocation.method( - #setAppUnlocked, - [status], - ), - returnValueForMissingStub: null, - ); - - @override - void setValidVibrator(bool? valid) => super.noSuchMethod( - Invocation.method( - #setValidVibrator, - [valid], - ), - returnValueForMissingStub: null, - ); - - @override - void addLog(_i6.AppLog? log) => super.noSuchMethod( - Invocation.method( - #addLog, - [log], - ), - returnValueForMissingStub: null, - ); - - @override - void setSelectedSettingsScreen({ - required int? screen, - bool? notify, - }) => - super.noSuchMethod( - Invocation.method( - #setSelectedSettingsScreen, - [], - { - #screen: screen, - #notify: notify, - }, - ), - returnValueForMissingStub: null, - ); - - @override - _i9.Future setUseBiometrics(bool? biometrics) => (super.noSuchMethod( - Invocation.method( - #setUseBiometrics, - [biometrics], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setImportantInfoReaden(bool? status) => (super.noSuchMethod( - Invocation.method( - #setImportantInfoReaden, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setPassCode(String? code) => (super.noSuchMethod( - Invocation.method( - #setPassCode, - [code], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setAutoRefreshTime(int? seconds) => (super.noSuchMethod( - Invocation.method( - #setAutoRefreshTime, - [seconds], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setLogsPerQuery(double? time) => (super.noSuchMethod( - Invocation.method( - #setLogsPerQuery, - [time], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setSendCrashReports(bool? status) => (super.noSuchMethod( - Invocation.method( - #setSendCrashReports, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - void saveFromDb(_i10.AppDbData? dbData) => super.noSuchMethod( - Invocation.method( - #saveFromDb, - [dbData], - ), - returnValueForMissingStub: null, - ); - - @override - _i9.Future setOverrideSslCheck(bool? status) => (super.noSuchMethod( - Invocation.method( - #setOverrideSslCheck, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setReducedDataCharts(bool? status) => (super.noSuchMethod( - Invocation.method( - #setReducedDataCharts, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setHideZeroValues(bool? status) => (super.noSuchMethod( - Invocation.method( - #setHideZeroValues, - [status], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setSelectedTheme(int? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedTheme, - [value], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setSelectedLanguage(String? value) => (super.noSuchMethod( - Invocation.method( - #setSelectedLanguage, - [value], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setStatisticsVisualizationMode(int? value) => - (super.noSuchMethod( - Invocation.method( - #setStatisticsVisualizationMode, - [value], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future restoreAppConfig() => (super.noSuchMethod( - Invocation.method( - #restoreAppConfig, - [], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} - -/// A class which mocks [ServersProvider]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockServersProvider extends _i1.Mock implements _i12.ServersProvider { - MockServersProvider() { - _i1.throwOnMissingStub(this); - } - - @override - _i2.AppColors get colors => (super.noSuchMethod( - Invocation.getter(#colors), - returnValue: _FakeAppColors_0( - this, - Invocation.getter(#colors), - ), - ) as _i2.AppColors); - - @override - List<_i13.Server> get getServersList => (super.noSuchMethod( - Invocation.getter(#getServersList), - returnValue: <_i13.Server>[], - ) as List<_i13.Server>); - - @override - int get numShown => (super.noSuchMethod( - Invocation.getter(#numShown), - returnValue: 0, - ) as int); - - @override - List<_i14.QueryStatus> get queryStatuses => (super.noSuchMethod( - Invocation.getter(#queryStatuses), - returnValue: <_i14.QueryStatus>[], - ) as List<_i14.QueryStatus>); - - @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); - - @override - void update(_i3.AppConfigProvider? provider) => super.noSuchMethod( - Invocation.method( - #update, - [provider], - ), - returnValueForMissingStub: null, - ); - - @override - _i15.ApiGateway? loadApiGateway(_i13.Server? server) => - (super.noSuchMethod(Invocation.method( - #loadApiGateway, - [server], - )) as _i15.ApiGateway?); - - @override - _i14.QueryStatus? getQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #getQueryStatus, - [key], - )) as _i14.QueryStatus?); - - @override - _i14.QueryStatus? findQueryStatus(String? key) => - (super.noSuchMethod(Invocation.method( - #findQueryStatus, - [key], - )) as _i14.QueryStatus?); - - @override - _i9.Future addServer(_i13.Server? server) => (super.noSuchMethod( - Invocation.method( - #addServer, - [server], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future editServer(_i13.Server? server) => (super.noSuchMethod( - Invocation.method( - #editServer, - [server], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future removeServer(String? serverAddress) => (super.noSuchMethod( - Invocation.method( - #removeServer, - [serverAddress], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future setDefaultServer(_i13.Server? server) => (super.noSuchMethod( - Invocation.method( - #setDefaultServer, - [server], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future saveFromDb(List<_i10.ServerDbData>? servers) => - (super.noSuchMethod( - Invocation.method( - #saveFromDb, - [servers], - ), - returnValue: _i9.Future.value(), - ) as _i9.Future); - - @override - _i9.FutureOr> checkUrlExists(String? url) => - (super.noSuchMethod( - Invocation.method( - #checkUrlExists, - [url], - ), - returnValue: - _i9.Future>.value({}), - ) as _i9.FutureOr>); - - @override - void setselectedServer({ - required _i13.Server? server, - bool? toHomeTab, - }) => - super.noSuchMethod( - Invocation.method( - #setselectedServer, - [], - { - #server: server, - #toHomeTab: toHomeTab, - }, - ), - returnValueForMissingStub: null, - ); - - @override - void updateselectedServerStatus(bool? enabled) => super.noSuchMethod( - Invocation.method( - #updateselectedServerStatus, - [enabled], - ), - returnValueForMissingStub: null, - ); - - @override - _i9.Future deleteDbData() => (super.noSuchMethod( - Invocation.method( - #deleteDbData, - [], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - _i9.Future resetSelectedServer() => (super.noSuchMethod( - Invocation.method( - #resetSelectedServer, - [], - ), - returnValue: _i9.Future.value(false), - ) as _i9.Future); - - @override - void addListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #addListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void removeListener(_i11.VoidCallback? listener) => super.noSuchMethod( - Invocation.method( - #removeListener, - [listener], - ), - returnValueForMissingStub: null, - ); - - @override - void dispose() => super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValueForMissingStub: null, - ); - - @override - void notifyListeners() => super.noSuchMethod( - Invocation.method( - #notifyListeners, - [], - ), - returnValueForMissingStub: null, - ); -} From 766c2bf9764d7aab5c8df367ceb9fb8f01c8141f Mon Sep 17 00:00:00 2001 From: tsutsu3 Date: Sun, 2 Feb 2025 00:32:54 +0900 Subject: [PATCH 2/5] test(base): add widget tests --- test/widgets/base_test.dart | 107 ++++++++++++++++++++++++++++++++++++ test/widgets/helpers.dart | 3 + 2 files changed, 110 insertions(+) create mode 100644 test/widgets/base_test.dart diff --git a/test/widgets/base_test.dart b/test/widgets/base_test.dart new file mode 100644 index 00000000..2f703845 --- /dev/null +++ b/test/widgets/base_test.dart @@ -0,0 +1,107 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mockito/mockito.dart'; +import 'package:pi_hole_client/base.dart'; +import 'package:pi_hole_client/widgets/start_warning_modal.dart'; + +import './helpers.dart'; + +void main() async { + await initializeApp(); + + group( + 'Base Widget Tests', + () { + late TestSetupHelper testSetup; + + setUp(() async { + testSetup = TestSetupHelper(); + + testSetup.initializeMock(useApiGatewayVersion: 'v6'); + }); + + testWidgets( + 'should show important info modal when firt time access', + (WidgetTester tester) async { + tester.view.physicalSize = const Size(1080, 2400); + tester.view.devicePixelRatio = 2.0; + + addTearDown(() { + tester.view.resetPhysicalSize(); + tester.view.resetDevicePixelRatio(); + }); + + when(testSetup.mockServersProvider.selectedServer).thenReturn(null); + when(testSetup.mockConfigProvider.importantInfoReaden) + .thenReturn(false); + + await tester.pumpWidget( + testSetup.buildTestWidget( + const Base(), + ), + ); + + expect(find.byType(Base), findsOneWidget); + await tester.pumpAndSettle(); + + expect(find.byType(StartInfoModal), findsOneWidget); + expect(find.text('Getting Started'), findsOneWidget); + }, + ); + + testWidgets( + 'should show mobile layout', + (WidgetTester tester) async { + tester.view.physicalSize = const Size(1080, 2400); + tester.view.devicePixelRatio = 2.0; + + addTearDown(() { + tester.view.resetPhysicalSize(); + tester.view.resetDevicePixelRatio(); + }); + + when(testSetup.mockServersProvider.selectedServer).thenReturn(null); + + await tester.pumpWidget( + testSetup.buildTestWidget( + const Base(), + ), + ); + + expect(find.byType(Base), findsOneWidget); + await tester.pump(); + + expect(find.byIcon(Icons.link_rounded), findsOneWidget); + expect(find.text('Servers'), findsOneWidget); + }, + ); + + testWidgets( + 'should show tablet layout', + (WidgetTester tester) async { + tester.view.physicalSize = const Size(2560, 1600); + tester.view.devicePixelRatio = 1.6; + + addTearDown(() { + tester.view.resetPhysicalSize(); + tester.view.resetDevicePixelRatio(); + }); + + when(testSetup.mockServersProvider.selectedServer).thenReturn(null); + + await tester.pumpWidget( + testSetup.buildTestWidget( + const Base(), + ), + ); + + expect(find.byType(Base), findsOneWidget); + await tester.pump(); + + expect(find.byIcon(Icons.link_rounded), findsOneWidget); + expect(find.text('Servers'), findsOneWidget); + }, + ); + }, + ); +} diff --git a/test/widgets/helpers.dart b/test/widgets/helpers.dart index 28bd4372..961891ff 100644 --- a/test/widgets/helpers.dart +++ b/test/widgets/helpers.dart @@ -867,6 +867,9 @@ class TestSetupHelper { .thenAnswer((_) async => true); when(mockConfigProvider.validVibrator).thenReturn(true); when(mockConfigProvider.setPassCode(any)).thenAnswer((_) async => true); + when(mockConfigProvider.selectedTab).thenReturn(0); + when(mockConfigProvider.importantInfoReaden).thenReturn(true); + when(mockConfigProvider.sendCrashReports).thenReturn(false); } void _initServerProviderMock(String useApiGatewayVersion) { From 2dbcfa894e0f2b45c3fd5b8008cbb5c15ae341f5 Mon Sep 17 00:00:00 2001 From: tsutsu3 Date: Sun, 2 Feb 2025 00:35:32 +0900 Subject: [PATCH 3/5] Add expected widget type --- test/widgets/base_test.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/widgets/base_test.dart b/test/widgets/base_test.dart index 2f703845..a3e3827a 100644 --- a/test/widgets/base_test.dart +++ b/test/widgets/base_test.dart @@ -2,6 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; import 'package:pi_hole_client/base.dart'; +import 'package:pi_hole_client/widgets/bottom_nav_bar.dart'; +import 'package:pi_hole_client/widgets/navigation_rail.dart'; import 'package:pi_hole_client/widgets/start_warning_modal.dart'; import './helpers.dart'; @@ -70,7 +72,7 @@ void main() async { expect(find.byType(Base), findsOneWidget); await tester.pump(); - + expect(find.byType(BottomNavBar), findsOneWidget); expect(find.byIcon(Icons.link_rounded), findsOneWidget); expect(find.text('Servers'), findsOneWidget); }, @@ -97,7 +99,7 @@ void main() async { expect(find.byType(Base), findsOneWidget); await tester.pump(); - + expect(find.byType(CustomNavigationRail), findsOneWidget); expect(find.byIcon(Icons.link_rounded), findsOneWidget); expect(find.text('Servers'), findsOneWidget); }, From d827a3a5261f15cf046fd91fc981cebc9ec60fa1 Mon Sep 17 00:00:00 2001 From: tsutsu3 Date: Sun, 2 Feb 2025 01:39:20 +0900 Subject: [PATCH 4/5] Add test --- test/widgets/base_test.dart | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/test/widgets/base_test.dart b/test/widgets/base_test.dart index a3e3827a..eed3a61f 100644 --- a/test/widgets/base_test.dart +++ b/test/widgets/base_test.dart @@ -2,11 +2,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; import 'package:pi_hole_client/base.dart'; +import 'package:pi_hole_client/screens/home/home.dart'; import 'package:pi_hole_client/widgets/bottom_nav_bar.dart'; import 'package:pi_hole_client/widgets/navigation_rail.dart'; import 'package:pi_hole_client/widgets/start_warning_modal.dart'; import './helpers.dart'; +import 'screens/utils.dart'; void main() async { await initializeApp(); @@ -52,7 +54,7 @@ void main() async { ); testWidgets( - 'should show mobile layout', + 'should show mobile layout with no selected server', (WidgetTester tester) async { tester.view.physicalSize = const Size(1080, 2400); tester.view.devicePixelRatio = 2.0; @@ -79,7 +81,7 @@ void main() async { ); testWidgets( - 'should show tablet layout', + 'should show tablet layout with no selected server', (WidgetTester tester) async { tester.view.physicalSize = const Size(2560, 1600); tester.view.devicePixelRatio = 1.6; @@ -104,6 +106,31 @@ void main() async { expect(find.text('Servers'), findsOneWidget); }, ); + + testWidgets( + 'should show mobile layout with selected server', + (WidgetTester tester) async { + tester.view.physicalSize = const Size(1080, 2400); + tester.view.devicePixelRatio = 2.0; + + addTearDown(() { + tester.view.resetPhysicalSize(); + tester.view.resetDevicePixelRatio(); + }); + + await tester.pumpWidget( + testSetup.buildTestWidget( + const Base(), + ), + ); + + expect(find.byType(Base), findsOneWidget); + await tester.pump(); + expect(find.byType(BottomNavBar), findsOneWidget); + expect(find.byIcon(Icons.link_rounded), findsNothing); + expect(find.byType(Home), findsOneWidget); + }, + ); }, ); } From 331d61ec3c43928b33f86b72735387aba99be829 Mon Sep 17 00:00:00 2001 From: tsutsu3 Date: Sun, 2 Feb 2025 01:40:00 +0900 Subject: [PATCH 5/5] Remove unused import --- test/full_coverage_test.dart | 1 - test/widgets/base_test.dart | 1 - 2 files changed, 2 deletions(-) diff --git a/test/full_coverage_test.dart b/test/full_coverage_test.dart index c5dfad7f..1aabe45a 100644 --- a/test/full_coverage_test.dart +++ b/test/full_coverage_test.dart @@ -124,7 +124,6 @@ import 'package:pi_hole_client/widgets/custom_list_tile.dart'; import 'package:pi_hole_client/widgets/custom_radio.dart'; import 'package:pi_hole_client/widgets/custom_radio_list_tile.dart'; import 'package:pi_hole_client/widgets/navigation_rail.dart'; -import 'package:pi_hole_client/widgets/no_server_selected.dart'; import 'package:pi_hole_client/widgets/numeric_pad.dart'; import 'package:pi_hole_client/widgets/option_box.dart'; import 'package:pi_hole_client/widgets/process_dialog.dart'; diff --git a/test/widgets/base_test.dart b/test/widgets/base_test.dart index eed3a61f..dd9be908 100644 --- a/test/widgets/base_test.dart +++ b/test/widgets/base_test.dart @@ -8,7 +8,6 @@ import 'package:pi_hole_client/widgets/navigation_rail.dart'; import 'package:pi_hole_client/widgets/start_warning_modal.dart'; import './helpers.dart'; -import 'screens/utils.dart'; void main() async { await initializeApp();