6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 8af803d1

AuthorMikkel Thygesen<mth@dwarf.dk>
Date2025-01-24 12:24:24 +0100
546: Removed mockito mocks

Changed files

comwell_key_app/test/home_test/home_bloc_test.dart |  17 +-
 .../test/home_test/home_bloc_test.mocks.dart       | 155 ----
 .../test/home_test/home_repository_test.dart       |   5 +-
 .../test/home_test/home_repository_test.mocks.dart | 415 -----------
 .../test/key_test/key_repository_test.dart         |  51 +-
 .../test/key_test/key_repository_test.mocks.dart   | 795 ---------------------
 6 files changed, 32 insertions(+), 1406 deletions(-)

Diff

diff --git a/comwell_key_app/test/home_test/home_bloc_test.dart b/comwell_key_app/test/home_test/home_bloc_test.dart
index 387e265b..ea921995 100644
--- a/comwell_key_app/test/home_test/home_bloc_test.dart
+++ b/comwell_key_app/test/home_test/home_bloc_test.dart
@@ -3,14 +3,10 @@ import 'package:comwell_key_app/home/bloc/home_bloc.dart';
import 'package:comwell_key_app/home/home_repository.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:bloc_test/bloc_test.dart';
-import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:seos_mobile_keys_plugin/app_usage_api.dart';
-import 'home_bloc_test.mocks.dart';
-
-
-@GenerateMocks([HomeRepository]) // Generate mock HomeRepository
+class MockHomeRepository extends Mock implements HomeRepository {}
void main() {
// Declare the mock HomeRepository
@@ -27,17 +23,16 @@ void main() {
'emits [ValidKey] when HomeInitialEvent is added and one key is returned',
build: () {
// Setup mock method to return true for isEndpointSetup
- when(mockHomeRepository.isEndpointSetup())
- .thenAnswer((_) async => true);
+ when(mockHomeRepository.isEndpointSetup()).thenAnswer((_) async => true);
// Setup mock method to return a list with one key for refreshKeys
- when(mockHomeRepository.refreshKeys())
- .thenAnswer((_) async => [MobileKeysKey(credentialType: 1, active: false)]);
+ when(mockHomeRepository.refreshKeys()).thenAnswer(
+ (_) async => [MobileKeysKey(credentialType: 1, active: false)]);
// Return HomeBloc with mocked repository
return HomeBloc(homeRepository: mockHomeRepository);
},
act: (bloc) => bloc.add(HomeInitialEvent()),
- // expect: () => [isA<ValidKey>()], // Expecting ValidKey state to be emitted
+ // expect: () => [isA<ValidKey>()], // Expecting ValidKey state to be emitted
);
// Add more tests for other scenarios and events...
-}
\ No newline at end of file
+}
diff --git a/comwell_key_app/test/home_test/home_bloc_test.mocks.dart b/comwell_key_app/test/home_test/home_bloc_test.mocks.dart
deleted file mode 100644
index 1fb43ebb..00000000
--- a/comwell_key_app/test/home_test/home_bloc_test.mocks.dart
+++ /dev/null
@@ -1,155 +0,0 @@
-// Mocks generated by Mockito 5.4.4 from annotations
-// in comwell_key_app/test/home_test/home_bloc_test.dart.
-// Do not manually edit this file.
-
-// ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'dart:async' as _i5;
-
-import 'package:comwell_key_app/home/home_repository.dart' as _i4;
-import 'package:comwell_key_app/services/api.dart' as _i2;
-import 'package:comwell_key_app/utils/secure_storage.dart' as _i3;
-import 'package:mockito/mockito.dart' as _i1;
-import 'package:seos_mobile_keys_plugin/app_usage_api.dart' as _i6;
-
-// 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: prefer_const_constructors
-// ignore_for_file: unnecessary_parenthesis
-// ignore_for_file: camel_case_types
-// ignore_for_file: subtype_of_sealed_class
-
-class _FakeApi_0 extends _i1.SmartFake implements _i2.Api {
- _FakeApi_0(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeSecureStorage_1 extends _i1.SmartFake implements _i3.SecureStorage {
- _FakeSecureStorage_1(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-/// A class which mocks [HomeRepository].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockHomeRepository extends _i1.Mock implements _i4.HomeRepository {
- MockHomeRepository() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i2.Api get api => (super.noSuchMethod(
- Invocation.getter(#api),
- returnValue: _FakeApi_0(
- this,
- Invocation.getter(#api),
- ),
- ) as _i2.Api);
-
- @override
- _i3.SecureStorage get secureStorage => (super.noSuchMethod(
- Invocation.getter(#secureStorage),
- returnValue: _FakeSecureStorage_1(
- this,
- Invocation.getter(#secureStorage),
- ),
- ) as _i3.SecureStorage);
-
- @override
- _i5.Future<bool> isEndpointSetup({bool? firstLaunch = true}) =>
- (super.noSuchMethod(
- Invocation.method(
- #isEndpointSetup,
- [],
- {#firstLaunch: firstLaunch},
- ),
- returnValue: _i5.Future<bool>.value(false),
- ) as _i5.Future<bool>);
-
- @override
- _i5.Future<bool> updateEndpoint() => (super.noSuchMethod(
- Invocation.method(
- #updateEndpoint,
- [],
- ),
- returnValue: _i5.Future<bool>.value(false),
- ) as _i5.Future<bool>);
-
- @override
- _i5.Future<List<_i6.MobileKeysKey>> refreshKeys() => (super.noSuchMethod(
- Invocation.method(
- #refreshKeys,
- [],
- ),
- returnValue:
- _i5.Future<List<_i6.MobileKeysKey>>.value(<_i6.MobileKeysKey>[]),
- ) as _i5.Future<List<_i6.MobileKeysKey>>);
-
- @override
- _i5.Future<bool> isHousesKeepingOrdered() => (super.noSuchMethod(
- Invocation.method(
- #isHousesKeepingOrdered,
- [],
- ),
- returnValue: _i5.Future<bool>.value(false),
- ) as _i5.Future<bool>);
-
- @override
- _i5.Future<void> setupEndpoint() => (super.noSuchMethod(
- Invocation.method(
- #setupEndpoint,
- [],
- ),
- returnValue: _i5.Future<void>.value(),
- returnValueForMissingStub: _i5.Future<void>.value(),
- ) as _i5.Future<void>);
-
- @override
- _i5.Future<void> provisionKey(
- String? bookingId, {
- bool? forceProvision = false,
- }) =>
- (super.noSuchMethod(
- Invocation.method(
- #provisionKey,
- [bookingId],
- {#forceProvision: forceProvision},
- ),
- returnValue: _i5.Future<void>.value(),
- returnValueForMissingStub: _i5.Future<void>.value(),
- ) as _i5.Future<void>);
-
- @override
- _i5.Future<bool> startMobilePlugin() => (super.noSuchMethod(
- Invocation.method(
- #startMobilePlugin,
- [],
- ),
- returnValue: _i5.Future<bool>.value(false),
- ) as _i5.Future<bool>);
-
- @override
- _i5.Future<String?> doesInvitationCodeExist(String? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #doesInvitationCodeExist,
- [key],
- ),
- returnValue: _i5.Future<String?>.value(),
- ) as _i5.Future<String?>);
-}
diff --git a/comwell_key_app/test/home_test/home_repository_test.dart b/comwell_key_app/test/home_test/home_repository_test.dart
index 17ebe086..f3875668 100644
--- a/comwell_key_app/test/home_test/home_repository_test.dart
+++ b/comwell_key_app/test/home_test/home_repository_test.dart
@@ -1,14 +1,11 @@
// Import necessary testing packages and mockito
import 'package:comwell_key_app/home/home_repository.dart';
import 'package:flutter_test/flutter_test.dart';
-import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:seos_mobile_keys_plugin/app_usage_api.dart';
import 'package:seos_mobile_keys_plugin/seos_mobile_keys_plugin.dart';
-import 'home_repository_test.mocks.dart';
-
-@GenerateMocks([SeosMobileKeysPlugin]) // Generate mock SeosMobileKeysPlugin
+class MockSeosMobileKeysPlugin extends Mock implements SeosMobileKeysPlugin {}
void main() {
// Declare the mock SeosMobileKeysPlugin
diff --git a/comwell_key_app/test/home_test/home_repository_test.mocks.dart b/comwell_key_app/test/home_test/home_repository_test.mocks.dart
deleted file mode 100644
index 61ee8f76..00000000
--- a/comwell_key_app/test/home_test/home_repository_test.mocks.dart
+++ /dev/null
@@ -1,415 +0,0 @@
-// Mocks generated by Mockito 5.4.4 from annotations
-// in comwell_key_app/test/home_test/home_repository_test.dart.
-// Do not manually edit this file.
-
-// ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'dart:async' as _i4;
-
-import 'package:mockito/mockito.dart' as _i1;
-import 'package:mockito/src/dummies.dart' as _i5;
-import 'package:seos_mobile_keys_plugin/app_usage_api.dart' as _i2;
-import 'package:seos_mobile_keys_plugin/seos_mobile_keys_plugin.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: prefer_const_constructors
-// ignore_for_file: unnecessary_parenthesis
-// ignore_for_file: camel_case_types
-// ignore_for_file: subtype_of_sealed_class
-
-class _FakeMobileKeysEndpointInfo_0 extends _i1.SmartFake
- implements _i2.MobileKeysEndpointInfo {
- _FakeMobileKeysEndpointInfo_0(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeMobileKeysLastAuthenticationInfo_1 extends _i1.SmartFake
- implements _i2.MobileKeysLastAuthenticationInfo {
- _FakeMobileKeysLastAuthenticationInfo_1(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-/// A class which mocks [SeosMobileKeysPlugin].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockSeosMobileKeysPlugin extends _i1.Mock
- implements _i3.SeosMobileKeysPlugin {
- MockSeosMobileKeysPlugin() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i4.Future<void> startUp(Map<String?, Object?>? options) =>
- (super.noSuchMethod(
- Invocation.method(
- #startUp,
- [options],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<bool> deviceHasBluetoothTurnedOn() => (super.noSuchMethod(
- Invocation.method(
- #deviceHasBluetoothTurnedOn,
- [],
- ),
- returnValue: _i4.Future<bool>.value(false),
- ) as _i4.Future<bool>);
-
- @override
- _i4.Future<bool> deviceSupportsBluetoothLowEnergy() => (super.noSuchMethod(
- Invocation.method(
- #deviceSupportsBluetoothLowEnergy,
- [],
- ),
- returnValue: _i4.Future<bool>.value(false),
- ) as _i4.Future<bool>);
-
- @override
- _i4.Future<bool> isEndpointSetup() => (super.noSuchMethod(
- Invocation.method(
- #isEndpointSetup,
- [],
- ),
- returnValue: _i4.Future<bool>.value(false),
- ) as _i4.Future<bool>);
-
- @override
- _i4.Future<void> setupEndpoint(String? invitationCode) => (super.noSuchMethod(
- Invocation.method(
- #setupEndpoint,
- [invitationCode],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> updateEndpoint() => (super.noSuchMethod(
- Invocation.method(
- #updateEndpoint,
- [],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> terminateEndpoint() => (super.noSuchMethod(
- Invocation.method(
- #terminateEndpoint,
- [],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<List<_i2.MobileKeysKey>> listMobileKeys() => (super.noSuchMethod(
- Invocation.method(
- #listMobileKeys,
- [],
- ),
- returnValue:
- _i4.Future<List<_i2.MobileKeysKey>>.value(<_i2.MobileKeysKey>[]),
- ) as _i4.Future<List<_i2.MobileKeysKey>>);
-
- @override
- _i4.Future<bool> activateMobileKey(_i2.MobileKeysKey? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #activateMobileKey,
- [key],
- ),
- returnValue: _i4.Future<bool>.value(false),
- ) as _i4.Future<bool>);
-
- @override
- _i4.Future<bool> deactivateMobileKey(_i2.MobileKeysKey? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #deactivateMobileKey,
- [key],
- ),
- returnValue: _i4.Future<bool>.value(false),
- ) as _i4.Future<bool>);
-
- @override
- _i4.Future<String> generateOTPForKey(_i2.MobileKeysKey? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #generateOTPForKey,
- [key],
- ),
- returnValue: _i4.Future<String>.value(_i5.dummyValue<String>(
- this,
- Invocation.method(
- #generateOTPForKey,
- [key],
- ),
- )),
- ) as _i4.Future<String>);
-
- @override
- _i4.Future<int> otpCounterForKey(_i2.MobileKeysKey? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #otpCounterForKey,
- [key],
- ),
- returnValue: _i4.Future<int>.value(0),
- ) as _i4.Future<int>);
-
- @override
- _i4.Future<_i2.MobileKeysEndpointInfo> endpointInfo() => (super.noSuchMethod(
- Invocation.method(
- #endpointInfo,
- [],
- ),
- returnValue: _i4.Future<_i2.MobileKeysEndpointInfo>.value(
- _FakeMobileKeysEndpointInfo_0(
- this,
- Invocation.method(
- #endpointInfo,
- [],
- ),
- )),
- ) as _i4.Future<_i2.MobileKeysEndpointInfo>);
-
- @override
- _i4.Future<List<_i2.MobileKeysInfoType>> healthCheck() => (super.noSuchMethod(
- Invocation.method(
- #healthCheck,
- [],
- ),
- returnValue: _i4.Future<List<_i2.MobileKeysInfoType>>.value(
- <_i2.MobileKeysInfoType>[]),
- ) as _i4.Future<List<_i2.MobileKeysInfoType>>);
-
- @override
- _i4.Future<String> apiVersion() => (super.noSuchMethod(
- Invocation.method(
- #apiVersion,
- [],
- ),
- returnValue: _i4.Future<String>.value(_i5.dummyValue<String>(
- this,
- Invocation.method(
- #apiVersion,
- [],
- ),
- )),
- ) as _i4.Future<String>);
-
- @override
- _i4.Future<bool> isScanning() => (super.noSuchMethod(
- Invocation.method(
- #isScanning,
- [],
- ),
- returnValue: _i4.Future<bool>.value(false),
- ) as _i4.Future<bool>);
-
- @override
- _i4.Future<void> startReaderScan(
- _i2.MobileKeysScanMode? mode,
- List<_i2.MobileKeysOpeningType?>? supportedOpeningTypes,
- List<int?>? lockServiceCodes,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #startReaderScan,
- [
- mode,
- supportedOpeningTypes,
- lockServiceCodes,
- ],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> setSupportedOpeningTypes(
- List<_i2.MobileKeysOpeningType>? supportedOpeningTypes) =>
- (super.noSuchMethod(
- Invocation.method(
- #setSupportedOpeningTypes,
- [supportedOpeningTypes],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> setTimeoutConfiguration(
- _i2.MobileKeysTimeoutConfiguration? timeoutConfiguration) =>
- (super.noSuchMethod(
- Invocation.method(
- #setTimeoutConfiguration,
- [timeoutConfiguration],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> stopReaderScan() => (super.noSuchMethod(
- Invocation.method(
- #stopReaderScan,
- [],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<_i2.MobileKeysLastAuthenticationInfo> lastAuthenticationInfo() =>
- (super.noSuchMethod(
- Invocation.method(
- #lastAuthenticationInfo,
- [],
- ),
- returnValue: _i4.Future<_i2.MobileKeysLastAuthenticationInfo>.value(
- _FakeMobileKeysLastAuthenticationInfo_1(
- this,
- Invocation.method(
- #lastAuthenticationInfo,
- [],
- ),
- )),
- ) as _i4.Future<_i2.MobileKeysLastAuthenticationInfo>);
-
- @override
- _i4.Future<List<_i2.MobileKeysReader>> listReaders() => (super.noSuchMethod(
- Invocation.method(
- #listReaders,
- [],
- ),
- returnValue: _i4.Future<List<_i2.MobileKeysReader>>.value(
- <_i2.MobileKeysReader>[]),
- ) as _i4.Future<List<_i2.MobileKeysReader>>);
-
- @override
- _i4.Future<_i2.MobileKeysReader?> closestReaderWithinRangeOfOpeningType(
- _i2.MobileKeysOpeningType? type) =>
- (super.noSuchMethod(
- Invocation.method(
- #closestReaderWithinRangeOfOpeningType,
- [type],
- ),
- returnValue: _i4.Future<_i2.MobileKeysReader?>.value(),
- ) as _i4.Future<_i2.MobileKeysReader?>);
-
- @override
- _i4.Future<void> connectToReader(
- _i2.MobileKeysReader? reader,
- _i2.MobileKeysOpeningType? openingType,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #connectToReader,
- [
- reader,
- openingType,
- ],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> forceConnectToReader(
- _i2.MobileKeysReader? reader,
- _i2.MobileKeysOpeningType? openingType,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #forceConnectToReader,
- [
- reader,
- openingType,
- ],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> cancelReaderConnection(_i2.MobileKeysReader? reader) =>
- (super.noSuchMethod(
- Invocation.method(
- #cancelReaderConnection,
- [reader],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> openClosestReader() => (super.noSuchMethod(
- Invocation.method(
- #openClosestReader,
- [],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> removeRootOpeningTrigger() => (super.noSuchMethod(
- Invocation.method(
- #removeRootOpeningTrigger,
- [],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<void> setRootOpeningTrigger() => (super.noSuchMethod(
- Invocation.method(
- #setRootOpeningTrigger,
- [],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-
- @override
- _i4.Future<bool> isAnalyticsEnabled() => (super.noSuchMethod(
- Invocation.method(
- #isAnalyticsEnabled,
- [],
- ),
- returnValue: _i4.Future<bool>.value(false),
- ) as _i4.Future<bool>);
-
- @override
- _i4.Future<void> analytics(bool? enable) => (super.noSuchMethod(
- Invocation.method(
- #analytics,
- [enable],
- ),
- returnValue: _i4.Future<void>.value(),
- returnValueForMissingStub: _i4.Future<void>.value(),
- ) as _i4.Future<void>);
-}
diff --git a/comwell_key_app/test/key_test/key_repository_test.dart b/comwell_key_app/test/key_test/key_repository_test.dart
index a3488e2e..6b2d8eec 100644
--- a/comwell_key_app/test/key_test/key_repository_test.dart
+++ b/comwell_key_app/test/key_test/key_repository_test.dart
@@ -1,16 +1,15 @@
import 'package:comwell_key_app/key/repository/key_repository.dart';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter_test/flutter_test.dart';
-import 'package:mockito/annotations.dart';
-import 'package:mockito/mockito.dart';
+import 'package:mocktail/mocktail.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:seos_mobile_keys_plugin/app_usage_api.dart';
import 'package:seos_mobile_keys_plugin/seos_mobile_keys_plugin.dart';
-import 'key_repository_test.mocks.dart';
+import '../home_test/home_repository_test.dart';
-
-@GenerateMocks([DeviceInfoPlugin, AndroidDeviceInfo, SeosMobileKeysPlugin])
+class MockAndroidDeviceInfo extends Mock implements AndroidDeviceInfo {}
+class MockDeviceInfoPlugin extends Mock implements DeviceInfoPlugin {}
void main() {
late KeyRepository keyRepository;
@@ -27,57 +26,57 @@ void main() {
group('KeyRepository', () {
test('checkDeviceInfo calls _checkAndStartScan on Android SDK >= 33', () async {
- when(mockDeviceInfoPlugin.androidInfo).thenAnswer((_) async => mockAndroidDeviceInfo);
- when(mockAndroidDeviceInfo.version.sdkInt).thenReturn(33);
- when(Permission.bluetoothScan.request()).thenAnswer((_) async => PermissionStatus.granted);
- when(Permission.bluetoothConnect.request()).thenAnswer((_) async => PermissionStatus.granted);
- when(Permission.bluetoothAdvertise.request()).thenAnswer((_) async => PermissionStatus.granted);
- when(Permission.notification.request()).thenAnswer((_) async => PermissionStatus.granted);
+ when(() => mockDeviceInfoPlugin.androidInfo).thenAnswer((_) async => mockAndroidDeviceInfo);
+ when(() => mockAndroidDeviceInfo.version.sdkInt).thenReturn(33);
+ when(() => Permission.bluetoothScan.request()).thenAnswer((_) async => PermissionStatus.granted);
+ when(() => Permission.bluetoothConnect.request()).thenAnswer((_) async => PermissionStatus.granted);
+ when(() => Permission.bluetoothAdvertise.request()).thenAnswer((_) async => PermissionStatus.granted);
+ when(() => Permission.notification.request()).thenAnswer((_) async => PermissionStatus.granted);
await keyRepository.checkDeviceInfo();
- verify(mockSeosMobileKeysPlugin.startReaderScan(MobileKeysScanMode.optimizePerformance, [any], [any])).called(1);
+ verify(() => mockSeosMobileKeysPlugin.startReaderScan(MobileKeysScanMode.optimizePerformance, [any()], [any()])).called(1);
});
test('checkDeviceInfo calls _checkAndStartScan on Android SDK >= 31', () async {
- when(mockDeviceInfoPlugin.androidInfo).thenAnswer((_) async => mockAndroidDeviceInfo);
- when(mockAndroidDeviceInfo.version.sdkInt).thenReturn(31);
- when(Permission.bluetoothScan.request()).thenAnswer((_) async => PermissionStatus.granted);
- when(Permission.bluetoothConnect.request()).thenAnswer((_) async => PermissionStatus.granted);
- when(Permission.bluetoothAdvertise.request()).thenAnswer((_) async => PermissionStatus.granted);
+ when(() => mockDeviceInfoPlugin.androidInfo).thenAnswer((_) async => mockAndroidDeviceInfo);
+ when(() => mockAndroidDeviceInfo.version.sdkInt).thenReturn(31);
+ when(() => Permission.bluetoothScan.request()).thenAnswer((_) async => PermissionStatus.granted);
+ when(() => Permission.bluetoothConnect.request()).thenAnswer((_) async => PermissionStatus.granted);
+ when(() => Permission.bluetoothAdvertise.request()).thenAnswer((_) async => PermissionStatus.granted);
await keyRepository.checkDeviceInfo();
- verify(mockSeosMobileKeysPlugin.startReaderScan(MobileKeysScanMode.optimizePerformance, [any], [any])).called(1);
+ verify(() => mockSeosMobileKeysPlugin.startReaderScan(MobileKeysScanMode.optimizePerformance, [any()], [any()])).called(1);
});
test('checkDeviceInfo calls _checkAndStartScan on Android SDK < 31', () async {
- when(mockDeviceInfoPlugin.androidInfo).thenAnswer((_) async => mockAndroidDeviceInfo);
- when(mockAndroidDeviceInfo.version.sdkInt).thenReturn(30);
- when(Permission.location.request()).thenAnswer((_) async => PermissionStatus.granted);
+ when(() => mockDeviceInfoPlugin.androidInfo).thenAnswer((_) async => mockAndroidDeviceInfo);
+ when(() => mockAndroidDeviceInfo.version.sdkInt).thenReturn(30);
+ when(() => Permission.location.request()).thenAnswer((_) async => PermissionStatus.granted);
await keyRepository.checkDeviceInfo();
- verify(mockSeosMobileKeysPlugin.startReaderScan(MobileKeysScanMode.optimizePerformance, [any], [any])).called(1);
+ verify(() => mockSeosMobileKeysPlugin.startReaderScan(MobileKeysScanMode.optimizePerformance, [any()], [any()])).called(1);
});
test('stopScanning calls stopReaderScan', () async {
await keyRepository.stopScanning();
- verify(mockSeosMobileKeysPlugin.stopReaderScan()).called(1);
+ verify(() => mockSeosMobileKeysPlugin.stopReaderScan()).called(1);
});
test('openClosestReader calls openClosestReader', () async {
await keyRepository.openClosestReader();
- verify(mockSeosMobileKeysPlugin.openClosestReader()).called(1);
+ verify(() => mockSeosMobileKeysPlugin.openClosestReader()).called(1);
});
test('_startScanning calls startReaderScan', () async {
-
+
keyRepository.startScanning();
- verify(mockSeosMobileKeysPlugin.startReaderScan(MobileKeysScanMode.optimizePerformance, [any], [any])).called(1);
+ verify(() => mockSeosMobileKeysPlugin.startReaderScan(MobileKeysScanMode.optimizePerformance, [any()], [any()])).called(1);
});
});
}
\ No newline at end of file
diff --git a/comwell_key_app/test/key_test/key_repository_test.mocks.dart b/comwell_key_app/test/key_test/key_repository_test.mocks.dart
deleted file mode 100644
index 0dc48de2..00000000
--- a/comwell_key_app/test/key_test/key_repository_test.mocks.dart
+++ /dev/null
@@ -1,795 +0,0 @@
-// Mocks generated by Mockito 5.4.4 from annotations
-// in comwell_key_app/test/key_test/key_repository_test.dart.
-// Do not manually edit this file.
-
-// ignore_for_file: no_leading_underscores_for_library_prefixes
-import 'dart:async' as _i11;
-
-import 'package:device_info_plus/device_info_plus.dart' as _i10;
-import 'package:device_info_plus/src/model/android_device_info.dart' as _i2;
-import 'package:device_info_plus/src/model/ios_device_info.dart' as _i3;
-import 'package:device_info_plus/src/model/linux_device_info.dart' as _i4;
-import 'package:device_info_plus/src/model/macos_device_info.dart' as _i6;
-import 'package:device_info_plus/src/model/web_browser_info.dart' as _i5;
-import 'package:device_info_plus/src/model/windows_device_info.dart' as _i7;
-import 'package:device_info_plus_platform_interface/device_info_plus_platform_interface.dart'
- as _i8;
-import 'package:mockito/mockito.dart' as _i1;
-import 'package:mockito/src/dummies.dart' as _i12;
-import 'package:seos_mobile_keys_plugin/app_usage_api.dart' as _i9;
-import 'package:seos_mobile_keys_plugin/seos_mobile_keys_plugin.dart' as _i13;
-
-// 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: prefer_const_constructors
-// ignore_for_file: unnecessary_parenthesis
-// ignore_for_file: camel_case_types
-// ignore_for_file: subtype_of_sealed_class
-
-class _FakeAndroidDeviceInfo_0 extends _i1.SmartFake
- implements _i2.AndroidDeviceInfo {
- _FakeAndroidDeviceInfo_0(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeIosDeviceInfo_1 extends _i1.SmartFake implements _i3.IosDeviceInfo {
- _FakeIosDeviceInfo_1(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeLinuxDeviceInfo_2 extends _i1.SmartFake
- implements _i4.LinuxDeviceInfo {
- _FakeLinuxDeviceInfo_2(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeWebBrowserInfo_3 extends _i1.SmartFake
- implements _i5.WebBrowserInfo {
- _FakeWebBrowserInfo_3(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeMacOsDeviceInfo_4 extends _i1.SmartFake
- implements _i6.MacOsDeviceInfo {
- _FakeMacOsDeviceInfo_4(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeWindowsDeviceInfo_5 extends _i1.SmartFake
- implements _i7.WindowsDeviceInfo {
- _FakeWindowsDeviceInfo_5(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeBaseDeviceInfo_6 extends _i1.SmartFake
- implements _i8.BaseDeviceInfo {
- _FakeBaseDeviceInfo_6(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeAndroidBuildVersion_7 extends _i1.SmartFake
- implements _i2.AndroidBuildVersion {
- _FakeAndroidBuildVersion_7(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeMobileKeysEndpointInfo_8 extends _i1.SmartFake
- implements _i9.MobileKeysEndpointInfo {
- _FakeMobileKeysEndpointInfo_8(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-class _FakeMobileKeysLastAuthenticationInfo_9 extends _i1.SmartFake
- implements _i9.MobileKeysLastAuthenticationInfo {
- _FakeMobileKeysLastAuthenticationInfo_9(
- Object parent,
- Invocation parentInvocation,
- ) : super(
- parent,
- parentInvocation,
- );
-}
-
-/// A class which mocks [DeviceInfoPlugin].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockDeviceInfoPlugin extends _i1.Mock implements _i10.DeviceInfoPlugin {
- MockDeviceInfoPlugin() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i11.Future<_i2.AndroidDeviceInfo> get androidInfo => (super.noSuchMethod(
- Invocation.getter(#androidInfo),
- returnValue:
- _i11.Future<_i2.AndroidDeviceInfo>.value(_FakeAndroidDeviceInfo_0(
- this,
- Invocation.getter(#androidInfo),
- )),
- ) as _i11.Future<_i2.AndroidDeviceInfo>);
-
- @override
- _i11.Future<_i3.IosDeviceInfo> get iosInfo => (super.noSuchMethod(
- Invocation.getter(#iosInfo),
- returnValue: _i11.Future<_i3.IosDeviceInfo>.value(_FakeIosDeviceInfo_1(
- this,
- Invocation.getter(#iosInfo),
- )),
- ) as _i11.Future<_i3.IosDeviceInfo>);
-
- @override
- _i11.Future<_i4.LinuxDeviceInfo> get linuxInfo => (super.noSuchMethod(
- Invocation.getter(#linuxInfo),
- returnValue:
- _i11.Future<_i4.LinuxDeviceInfo>.value(_FakeLinuxDeviceInfo_2(
- this,
- Invocation.getter(#linuxInfo),
- )),
- ) as _i11.Future<_i4.LinuxDeviceInfo>);
-
- @override
- _i11.Future<_i5.WebBrowserInfo> get webBrowserInfo => (super.noSuchMethod(
- Invocation.getter(#webBrowserInfo),
- returnValue:
- _i11.Future<_i5.WebBrowserInfo>.value(_FakeWebBrowserInfo_3(
- this,
- Invocation.getter(#webBrowserInfo),
- )),
- ) as _i11.Future<_i5.WebBrowserInfo>);
-
- @override
- _i11.Future<_i6.MacOsDeviceInfo> get macOsInfo => (super.noSuchMethod(
- Invocation.getter(#macOsInfo),
- returnValue:
- _i11.Future<_i6.MacOsDeviceInfo>.value(_FakeMacOsDeviceInfo_4(
- this,
- Invocation.getter(#macOsInfo),
- )),
- ) as _i11.Future<_i6.MacOsDeviceInfo>);
-
- @override
- _i11.Future<_i7.WindowsDeviceInfo> get windowsInfo => (super.noSuchMethod(
- Invocation.getter(#windowsInfo),
- returnValue:
- _i11.Future<_i7.WindowsDeviceInfo>.value(_FakeWindowsDeviceInfo_5(
- this,
- Invocation.getter(#windowsInfo),
- )),
- ) as _i11.Future<_i7.WindowsDeviceInfo>);
-
- @override
- _i11.Future<_i8.BaseDeviceInfo> get deviceInfo => (super.noSuchMethod(
- Invocation.getter(#deviceInfo),
- returnValue:
- _i11.Future<_i8.BaseDeviceInfo>.value(_FakeBaseDeviceInfo_6(
- this,
- Invocation.getter(#deviceInfo),
- )),
- ) as _i11.Future<_i8.BaseDeviceInfo>);
-}
-
-/// A class which mocks [AndroidDeviceInfo].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockAndroidDeviceInfo extends _i1.Mock implements _i2.AndroidDeviceInfo {
- MockAndroidDeviceInfo() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i2.AndroidBuildVersion get version => (super.noSuchMethod(
- Invocation.getter(#version),
- returnValue: _FakeAndroidBuildVersion_7(
- this,
- Invocation.getter(#version),
- ),
- ) as _i2.AndroidBuildVersion);
-
- @override
- String get board => (super.noSuchMethod(
- Invocation.getter(#board),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#board),
- ),
- ) as String);
-
- @override
- String get bootloader => (super.noSuchMethod(
- Invocation.getter(#bootloader),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#bootloader),
- ),
- ) as String);
-
- @override
- String get brand => (super.noSuchMethod(
- Invocation.getter(#brand),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#brand),
- ),
- ) as String);
-
- @override
- String get device => (super.noSuchMethod(
- Invocation.getter(#device),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#device),
- ),
- ) as String);
-
- @override
- String get display => (super.noSuchMethod(
- Invocation.getter(#display),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#display),
- ),
- ) as String);
-
- @override
- String get fingerprint => (super.noSuchMethod(
- Invocation.getter(#fingerprint),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#fingerprint),
- ),
- ) as String);
-
- @override
- String get hardware => (super.noSuchMethod(
- Invocation.getter(#hardware),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#hardware),
- ),
- ) as String);
-
- @override
- String get host => (super.noSuchMethod(
- Invocation.getter(#host),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#host),
- ),
- ) as String);
-
- @override
- String get id => (super.noSuchMethod(
- Invocation.getter(#id),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#id),
- ),
- ) as String);
-
- @override
- String get manufacturer => (super.noSuchMethod(
- Invocation.getter(#manufacturer),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#manufacturer),
- ),
- ) as String);
-
- @override
- String get model => (super.noSuchMethod(
- Invocation.getter(#model),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#model),
- ),
- ) as String);
-
- @override
- String get product => (super.noSuchMethod(
- Invocation.getter(#product),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#product),
- ),
- ) as String);
-
- @override
- List<String> get supported32BitAbis => (super.noSuchMethod(
- Invocation.getter(#supported32BitAbis),
- returnValue: <String>[],
- ) as List<String>);
-
- @override
- List<String> get supported64BitAbis => (super.noSuchMethod(
- Invocation.getter(#supported64BitAbis),
- returnValue: <String>[],
- ) as List<String>);
-
- @override
- List<String> get supportedAbis => (super.noSuchMethod(
- Invocation.getter(#supportedAbis),
- returnValue: <String>[],
- ) as List<String>);
-
- @override
- String get tags => (super.noSuchMethod(
- Invocation.getter(#tags),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#tags),
- ),
- ) as String);
-
- @override
- String get type => (super.noSuchMethod(
- Invocation.getter(#type),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#type),
- ),
- ) as String);
-
- @override
- bool get isPhysicalDevice => (super.noSuchMethod(
- Invocation.getter(#isPhysicalDevice),
- returnValue: false,
- ) as bool);
-
- @override
- List<String> get systemFeatures => (super.noSuchMethod(
- Invocation.getter(#systemFeatures),
- returnValue: <String>[],
- ) as List<String>);
-
- @override
- String get serialNumber => (super.noSuchMethod(
- Invocation.getter(#serialNumber),
- returnValue: _i12.dummyValue<String>(
- this,
- Invocation.getter(#serialNumber),
- ),
- ) as String);
-
- @override
- bool get isLowRamDevice => (super.noSuchMethod(
- Invocation.getter(#isLowRamDevice),
- returnValue: false,
- ) as bool);
-
- @override
- Map<String, dynamic> get data => (super.noSuchMethod(
- Invocation.getter(#data),
- returnValue: <String, dynamic>{},
- ) as Map<String, dynamic>);
-
- @override
- Map<String, dynamic> toMap() => (super.noSuchMethod(
- Invocation.method(
- #toMap,
- [],
- ),
- returnValue: <String, dynamic>{},
- ) as Map<String, dynamic>);
-}
-
-/// A class which mocks [SeosMobileKeysPlugin].
-///
-/// See the documentation for Mockito's code generation for more information.
-class MockSeosMobileKeysPlugin extends _i1.Mock
- implements _i13.SeosMobileKeysPlugin {
- MockSeosMobileKeysPlugin() {
- _i1.throwOnMissingStub(this);
- }
-
- @override
- _i11.Future<void> startUp(Map<String?, Object?>? options) =>
- (super.noSuchMethod(
- Invocation.method(
- #startUp,
- [options],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<bool> deviceHasBluetoothTurnedOn() => (super.noSuchMethod(
- Invocation.method(
- #deviceHasBluetoothTurnedOn,
- [],
- ),
- returnValue: _i11.Future<bool>.value(false),
- ) as _i11.Future<bool>);
-
- @override
- _i11.Future<bool> deviceSupportsBluetoothLowEnergy() => (super.noSuchMethod(
- Invocation.method(
- #deviceSupportsBluetoothLowEnergy,
- [],
- ),
- returnValue: _i11.Future<bool>.value(false),
- ) as _i11.Future<bool>);
-
- @override
- _i11.Future<bool> isEndpointSetup() => (super.noSuchMethod(
- Invocation.method(
- #isEndpointSetup,
- [],
- ),
- returnValue: _i11.Future<bool>.value(false),
- ) as _i11.Future<bool>);
-
- @override
- _i11.Future<void> setupEndpoint(String? invitationCode) =>
- (super.noSuchMethod(
- Invocation.method(
- #setupEndpoint,
- [invitationCode],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> updateEndpoint() => (super.noSuchMethod(
- Invocation.method(
- #updateEndpoint,
- [],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> terminateEndpoint() => (super.noSuchMethod(
- Invocation.method(
- #terminateEndpoint,
- [],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<List<_i9.MobileKeysKey>> listMobileKeys() => (super.noSuchMethod(
- Invocation.method(
- #listMobileKeys,
- [],
- ),
- returnValue:
- _i11.Future<List<_i9.MobileKeysKey>>.value(<_i9.MobileKeysKey>[]),
- ) as _i11.Future<List<_i9.MobileKeysKey>>);
-
- @override
- _i11.Future<bool> activateMobileKey(_i9.MobileKeysKey? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #activateMobileKey,
- [key],
- ),
- returnValue: _i11.Future<bool>.value(false),
- ) as _i11.Future<bool>);
-
- @override
- _i11.Future<bool> deactivateMobileKey(_i9.MobileKeysKey? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #deactivateMobileKey,
- [key],
- ),
- returnValue: _i11.Future<bool>.value(false),
- ) as _i11.Future<bool>);
-
- @override
- _i11.Future<String> generateOTPForKey(_i9.MobileKeysKey? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #generateOTPForKey,
- [key],
- ),
- returnValue: _i11.Future<String>.value(_i12.dummyValue<String>(
- this,
- Invocation.method(
- #generateOTPForKey,
- [key],
- ),
- )),
- ) as _i11.Future<String>);
-
- @override
- _i11.Future<int> otpCounterForKey(_i9.MobileKeysKey? key) =>
- (super.noSuchMethod(
- Invocation.method(
- #otpCounterForKey,
- [key],
- ),
- returnValue: _i11.Future<int>.value(0),
- ) as _i11.Future<int>);
-
- @override
- _i11.Future<_i9.MobileKeysEndpointInfo> endpointInfo() => (super.noSuchMethod(
- Invocation.method(
- #endpointInfo,
- [],
- ),
- returnValue: _i11.Future<_i9.MobileKeysEndpointInfo>.value(
- _FakeMobileKeysEndpointInfo_8(
- this,
- Invocation.method(
- #endpointInfo,
- [],
- ),
- )),
- ) as _i11.Future<_i9.MobileKeysEndpointInfo>);
-
- @override
- _i11.Future<List<_i9.MobileKeysInfoType>> healthCheck() =>
- (super.noSuchMethod(
- Invocation.method(
- #healthCheck,
- [],
- ),
- returnValue: _i11.Future<List<_i9.MobileKeysInfoType>>.value(
- <_i9.MobileKeysInfoType>[]),
- ) as _i11.Future<List<_i9.MobileKeysInfoType>>);
-
- @override
- _i11.Future<String> apiVersion() => (super.noSuchMethod(
- Invocation.method(
- #apiVersion,
- [],
- ),
- returnValue: _i11.Future<String>.value(_i12.dummyValue<String>(
- this,
- Invocation.method(
- #apiVersion,
- [],
- ),
- )),
- ) as _i11.Future<String>);
-
- @override
- _i11.Future<bool> isScanning() => (super.noSuchMethod(
- Invocation.method(
- #isScanning,
- [],
- ),
- returnValue: _i11.Future<bool>.value(false),
- ) as _i11.Future<bool>);
-
- @override
- _i11.Future<void> startReaderScan(
- _i9.MobileKeysScanMode? mode,
- List<_i9.MobileKeysOpeningType?>? supportedOpeningTypes,
- List<int?>? lockServiceCodes,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #startReaderScan,
- [
- mode,
- supportedOpeningTypes,
- lockServiceCodes,
- ],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> setSupportedOpeningTypes(
- List<_i9.MobileKeysOpeningType>? supportedOpeningTypes) =>
- (super.noSuchMethod(
- Invocation.method(
- #setSupportedOpeningTypes,
- [supportedOpeningTypes],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> setTimeoutConfiguration(
- _i9.MobileKeysTimeoutConfiguration? timeoutConfiguration) =>
- (super.noSuchMethod(
- Invocation.method(
- #setTimeoutConfiguration,
- [timeoutConfiguration],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> stopReaderScan() => (super.noSuchMethod(
- Invocation.method(
- #stopReaderScan,
- [],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<_i9.MobileKeysLastAuthenticationInfo> lastAuthenticationInfo() =>
- (super.noSuchMethod(
- Invocation.method(
- #lastAuthenticationInfo,
- [],
- ),
- returnValue: _i11.Future<_i9.MobileKeysLastAuthenticationInfo>.value(
- _FakeMobileKeysLastAuthenticationInfo_9(
- this,
- Invocation.method(
- #lastAuthenticationInfo,
- [],
- ),
- )),
- ) as _i11.Future<_i9.MobileKeysLastAuthenticationInfo>);
-
- @override
- _i11.Future<List<_i9.MobileKeysReader>> listReaders() => (super.noSuchMethod(
- Invocation.method(
- #listReaders,
- [],
- ),
- returnValue: _i11.Future<List<_i9.MobileKeysReader>>.value(
- <_i9.MobileKeysReader>[]),
- ) as _i11.Future<List<_i9.MobileKeysReader>>);
-
- @override
- _i11.Future<_i9.MobileKeysReader?> closestReaderWithinRangeOfOpeningType(
- _i9.MobileKeysOpeningType? type) =>
- (super.noSuchMethod(
- Invocation.method(
- #closestReaderWithinRangeOfOpeningType,
- [type],
- ),
- returnValue: _i11.Future<_i9.MobileKeysReader?>.value(),
- ) as _i11.Future<_i9.MobileKeysReader?>);
-
- @override
- _i11.Future<void> connectToReader(
- _i9.MobileKeysReader? reader,
- _i9.MobileKeysOpeningType? openingType,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #connectToReader,
- [
- reader,
- openingType,
- ],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> forceConnectToReader(
- _i9.MobileKeysReader? reader,
- _i9.MobileKeysOpeningType? openingType,
- ) =>
- (super.noSuchMethod(
- Invocation.method(
- #forceConnectToReader,
- [
- reader,
- openingType,
- ],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> cancelReaderConnection(_i9.MobileKeysReader? reader) =>
- (super.noSuchMethod(
- Invocation.method(
- #cancelReaderConnection,
- [reader],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> openClosestReader() => (super.noSuchMethod(
- Invocation.method(
- #openClosestReader,
- [],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> removeRootOpeningTrigger() => (super.noSuchMethod(
- Invocation.method(
- #removeRootOpeningTrigger,
- [],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<void> setRootOpeningTrigger() => (super.noSuchMethod(
- Invocation.method(
- #setRootOpeningTrigger,
- [],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-
- @override
- _i11.Future<bool> isAnalyticsEnabled() => (super.noSuchMethod(
- Invocation.method(
- #isAnalyticsEnabled,
- [],
- ),
- returnValue: _i11.Future<bool>.value(false),
- ) as _i11.Future<bool>);
-
- @override
- _i11.Future<void> analytics(bool? enable) => (super.noSuchMethod(
- Invocation.method(
- #analytics,
- [enable],
- ),
- returnValue: _i11.Future<void>.value(),
- returnValueForMissingStub: _i11.Future<void>.value(),
- ) as _i11.Future<void>);
-}