From 134446a7f56cda95b10bfa6ee3d56503cf7f69b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=98n=20Ustin=C3=98ff?= Date: Thu, 25 Jul 2024 17:25:01 +0400 Subject: [PATCH] chore(1.7.1): update `mocks` --- test/util/mocks.mocks.dart | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/test/util/mocks.mocks.dart b/test/util/mocks.mocks.dart index af92dd8..e265d23 100644 --- a/test/util/mocks.mocks.dart +++ b/test/util/mocks.mocks.dart @@ -10,6 +10,7 @@ import 'dart:typed_data' as _i6; import 'package:http/http.dart' as _i2; 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; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -280,3 +281,63 @@ class MockClient extends _i1.Mock implements _i2.Client { returnValueForMissingStub: null, ); } + +/// A class which mocks [PackageInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockPackageInfo extends _i1.Mock implements _i7.PackageInfo { + MockPackageInfo() { + _i1.throwOnMissingStub(this); + } + + @override + String get appName => (super.noSuchMethod( + Invocation.getter(#appName), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#appName), + ), + ) as String); + + @override + String get packageName => (super.noSuchMethod( + Invocation.getter(#packageName), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#packageName), + ), + ) as String); + + @override + String get version => (super.noSuchMethod( + Invocation.getter(#version), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#version), + ), + ) as String); + + @override + String get buildNumber => (super.noSuchMethod( + Invocation.getter(#buildNumber), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#buildNumber), + ), + ) as String); + + @override + String get buildSignature => (super.noSuchMethod( + Invocation.getter(#buildSignature), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#buildSignature), + ), + ) as String); + + @override + Map get data => (super.noSuchMethod( + Invocation.getter(#data), + returnValue: {}, + ) as Map); +}