6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 39407ee5
Changed files
azure/azure-pipelines.yml | 1 + comwell_key_app/test/home_test/home_bloc_test.dart | 43 ++ .../test/home_test/home_bloc_test.mocks.dart | 42 ++ .../test/home_test/home_repository_test.dart | 56 ++ .../test/home_test/home_repository_test.mocks.dart | 415 +++++++++++++ .../test/key_test/key_repository_test.dart | 13 +- .../test/key_test/key_repository_test.mocks.dart | 661 +++++++++++++++++++++ .../test/welcome_test/welcome_bloc_test.dart | 18 +- .../test/welcome_test/welcome_bloc_test.mocks.dart | 61 ++ 9 files changed, 1295 insertions(+), 15 deletions(-)
Diff
diff --git a/azure/azure-pipelines.yml b/azure/azure-pipelines.yml
index 1d2f23f7..b6458aba 100644
--- a/azure/azure-pipelines.yml
+++ b/azure/azure-pipelines.yml
@@ -5,6 +5,7 @@ trigger:
stages:
+# Build test Apps
- template: /azure/templates/build-web.yml
parameters:
name: environment
diff --git a/comwell_key_app/test/home_test/home_bloc_test.dart b/comwell_key_app/test/home_test/home_bloc_test.dart
new file mode 100644
index 00000000..fc073010
--- /dev/null
+++ b/comwell_key_app/test/home_test/home_bloc_test.dart
@@ -0,0 +1,43 @@
+// Import necessary testing packages, bloc, and mockito
+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
+
+void main() {
+ // Declare the mock HomeRepository
+ late HomeRepository mockHomeRepository;
+
+ // Setup function runs before every test
+ setUp(() {
+ // Initialize the mock HomeRepository
+ mockHomeRepository = MockHomeRepository();
+ });
+
+ // Example test for HomeInitialEvent
+ blocTest<HomeBloc, HomeState>(
+ '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);
+ // Setup mock method to return a list with one key for refreshKeys
+ 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
+ );
+
+ // 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
new file mode 100644
index 00000000..84c7380d
--- /dev/null
+++ b/comwell_key_app/test/home_test/home_bloc_test.mocks.dart
@@ -0,0 +1,42 @@
+// 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 _i3;
+
+import 'package:comwell_key_app/home/home_repository.dart' as _i2;
+import 'package:mockito/mockito.dart' as _i1;
+
+// 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
+
+/// A class which mocks [HomeRepository].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockHomeRepository extends _i1.Mock implements _i2.HomeRepository {
+ MockHomeRepository() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i3.Future<bool> isEndpointSetup({bool? firstLaunch = true}) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #isEndpointSetup,
+ [],
+ {#firstLaunch: firstLaunch},
+ ),
+ returnValue: _i3.Future<bool>.value(false),
+ ) as _i3.Future<bool>);
+}
diff --git a/comwell_key_app/test/home_test/home_repository_test.dart b/comwell_key_app/test/home_test/home_repository_test.dart
new file mode 100644
index 00000000..17ebe086
--- /dev/null
+++ b/comwell_key_app/test/home_test/home_repository_test.dart
@@ -0,0 +1,56 @@
+// 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
+
+void main() {
+ // Declare the mock SeosMobileKeysPlugin
+ late SeosMobileKeysPlugin mockSeosMobileKeysPlugin;
+ late HomeRepository homeRepository;
+
+ // Setup function runs before every test
+ setUp(() {
+ // Initialize the mock SeosMobileKeysPlugin
+ TestWidgetsFlutterBinding.ensureInitialized();
+ mockSeosMobileKeysPlugin = MockSeosMobileKeysPlugin();
+ homeRepository = HomeRepository();
+
+ });
+
+ group('HomeRepository', () {
+ test('isEndpointSetup returns true when endpoint is setup', () async {
+ when(mockSeosMobileKeysPlugin.isEndpointSetup()).thenAnswer((_) async => true);
+
+
+ expect(await homeRepository.isEndpointSetup(), isTrue);
+ });
+
+ test('isEndpointSetup returns false when endpoint is not setup', () async {
+ when(mockSeosMobileKeysPlugin.isEndpointSetup()).thenAnswer((_) async => false);
+
+
+ expect(await homeRepository.isEndpointSetup(), isFalse);
+ });
+
+ test('refreshKeys returns a list of MobileKeysKey on success', () async {
+ when(mockSeosMobileKeysPlugin.listMobileKeys()).thenAnswer((_) async => [MobileKeysKey(active: true, credentialType: 1)]);
+
+ final keys = await homeRepository.refreshKeys();
+ expect(keys, isNotNull);
+ expect(keys, isA<List<MobileKeysKey?>>());
+ });
+
+ test('refreshKeys throws an exception on failure', () async {
+ when(mockSeosMobileKeysPlugin.listMobileKeys()).thenThrow(Exception('Failed to list keys'));
+
+ expect(homeRepository.refreshKeys(), throwsA(isA<Exception>()));
+ });
+ });
+}
\ No newline at end of file
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
new file mode 100644
index 00000000..61ee8f76
--- /dev/null
+++ b/comwell_key_app/test/home_test/home_repository_test.mocks.dart
@@ -0,0 +1,415 @@
+// 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 f1db517f..4d3ac8cf 100644
--- a/comwell_key_app/test/key_test/key_repository_test.dart
+++ b/comwell_key_app/test/key_test/key_repository_test.dart
@@ -6,18 +6,17 @@ import 'package:mockito/mockito.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';
-class MockDeviceInfoPlugin extends Mock implements DeviceInfoPlugin {}
-class MockAndroidDeviceInfo extends Mock implements AndroidDeviceInfo {}
-class MockSeosMobileKeysPlugin extends Mock implements SeosMobileKeysPlugin {}
-@GenerateMocks([MockDeviceInfoPlugin, MockAndroidDeviceInfo, MockSeosMobileKeysPlugin])
+
+@GenerateMocks([DeviceInfoPlugin, AndroidDeviceInfo, SeosMobileKeysPlugin])
void main() {
late KeyRepository keyRepository;
- late MockSeosMobileKeysPlugin mockSeosMobileKeysPlugin;
- late MockAndroidDeviceInfo mockAndroidDeviceInfo;
- late MockDeviceInfoPlugin mockDeviceInfoPlugin;
+ late SeosMobileKeysPlugin mockSeosMobileKeysPlugin;
+ late AndroidDeviceInfo mockAndroidDeviceInfo;
+ late DeviceInfoPlugin mockDeviceInfoPlugin;
setUp(() {
mockSeosMobileKeysPlugin = MockSeosMobileKeysPlugin();
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
new file mode 100644
index 00000000..62904801
--- /dev/null
+++ b/comwell_key_app/test/key_test/key_repository_test.mocks.dart
@@ -0,0 +1,661 @@
+// 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 _i5;
+
+import 'package:device_info/device_info.dart' as _i4;
+import 'package:device_info_platform_interface/device_info_platform_interface.dart'
+ as _i2;
+import 'package:mockito/mockito.dart' as _i1;
+import 'package:mockito/src/dummies.dart' as _i6;
+import 'package:seos_mobile_keys_plugin/app_usage_api.dart' as _i3;
+import 'package:seos_mobile_keys_plugin/seos_mobile_keys_plugin.dart' as _i7;
+
+// 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 _i2.IosDeviceInfo {
+ _FakeIosDeviceInfo_1(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeAndroidBuildVersion_2 extends _i1.SmartFake
+ implements _i2.AndroidBuildVersion {
+ _FakeAndroidBuildVersion_2(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeMobileKeysEndpointInfo_3 extends _i1.SmartFake
+ implements _i3.MobileKeysEndpointInfo {
+ _FakeMobileKeysEndpointInfo_3(
+ Object parent,
+ Invocation parentInvocation,
+ ) : super(
+ parent,
+ parentInvocation,
+ );
+}
+
+class _FakeMobileKeysLastAuthenticationInfo_4 extends _i1.SmartFake
+ implements _i3.MobileKeysLastAuthenticationInfo {
+ _FakeMobileKeysLastAuthenticationInfo_4(
+ 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 _i4.DeviceInfoPlugin {
+ MockDeviceInfoPlugin() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i5.Future<_i2.AndroidDeviceInfo> get androidInfo => (super.noSuchMethod(
+ Invocation.getter(#androidInfo),
+ returnValue:
+ _i5.Future<_i2.AndroidDeviceInfo>.value(_FakeAndroidDeviceInfo_0(
+ this,
+ Invocation.getter(#androidInfo),
+ )),
+ ) as _i5.Future<_i2.AndroidDeviceInfo>);
+
+ @override
+ _i5.Future<_i2.IosDeviceInfo> get iosInfo => (super.noSuchMethod(
+ Invocation.getter(#iosInfo),
+ returnValue: _i5.Future<_i2.IosDeviceInfo>.value(_FakeIosDeviceInfo_1(
+ this,
+ Invocation.getter(#iosInfo),
+ )),
+ ) as _i5.Future<_i2.IosDeviceInfo>);
+}
+
+/// 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_2(
+ this,
+ Invocation.getter(#version),
+ ),
+ ) as _i2.AndroidBuildVersion);
+
+ @override
+ String get board => (super.noSuchMethod(
+ Invocation.getter(#board),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#board),
+ ),
+ ) as String);
+
+ @override
+ String get bootloader => (super.noSuchMethod(
+ Invocation.getter(#bootloader),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#bootloader),
+ ),
+ ) as String);
+
+ @override
+ String get brand => (super.noSuchMethod(
+ Invocation.getter(#brand),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#brand),
+ ),
+ ) as String);
+
+ @override
+ String get device => (super.noSuchMethod(
+ Invocation.getter(#device),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#device),
+ ),
+ ) as String);
+
+ @override
+ String get display => (super.noSuchMethod(
+ Invocation.getter(#display),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#display),
+ ),
+ ) as String);
+
+ @override
+ String get fingerprint => (super.noSuchMethod(
+ Invocation.getter(#fingerprint),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#fingerprint),
+ ),
+ ) as String);
+
+ @override
+ String get hardware => (super.noSuchMethod(
+ Invocation.getter(#hardware),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#hardware),
+ ),
+ ) as String);
+
+ @override
+ String get host => (super.noSuchMethod(
+ Invocation.getter(#host),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#host),
+ ),
+ ) as String);
+
+ @override
+ String get id => (super.noSuchMethod(
+ Invocation.getter(#id),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#id),
+ ),
+ ) as String);
+
+ @override
+ String get manufacturer => (super.noSuchMethod(
+ Invocation.getter(#manufacturer),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#manufacturer),
+ ),
+ ) as String);
+
+ @override
+ String get model => (super.noSuchMethod(
+ Invocation.getter(#model),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#model),
+ ),
+ ) as String);
+
+ @override
+ String get product => (super.noSuchMethod(
+ Invocation.getter(#product),
+ returnValue: _i6.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: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#tags),
+ ),
+ ) as String);
+
+ @override
+ String get type => (super.noSuchMethod(
+ Invocation.getter(#type),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#type),
+ ),
+ ) as String);
+
+ @override
+ bool get isPhysicalDevice => (super.noSuchMethod(
+ Invocation.getter(#isPhysicalDevice),
+ returnValue: false,
+ ) as bool);
+
+ @override
+ String get androidId => (super.noSuchMethod(
+ Invocation.getter(#androidId),
+ returnValue: _i6.dummyValue<String>(
+ this,
+ Invocation.getter(#androidId),
+ ),
+ ) as String);
+
+ @override
+ List<String> get systemFeatures => (super.noSuchMethod(
+ Invocation.getter(#systemFeatures),
+ returnValue: <String>[],
+ ) as List<String>);
+}
+
+/// A class which mocks [SeosMobileKeysPlugin].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockSeosMobileKeysPlugin extends _i1.Mock
+ implements _i7.SeosMobileKeysPlugin {
+ MockSeosMobileKeysPlugin() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i5.Future<void> startUp(Map<String?, Object?>? options) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #startUp,
+ [options],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<bool> deviceHasBluetoothTurnedOn() => (super.noSuchMethod(
+ Invocation.method(
+ #deviceHasBluetoothTurnedOn,
+ [],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<bool> deviceSupportsBluetoothLowEnergy() => (super.noSuchMethod(
+ Invocation.method(
+ #deviceSupportsBluetoothLowEnergy,
+ [],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<bool> isEndpointSetup() => (super.noSuchMethod(
+ Invocation.method(
+ #isEndpointSetup,
+ [],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<void> setupEndpoint(String? invitationCode) => (super.noSuchMethod(
+ Invocation.method(
+ #setupEndpoint,
+ [invitationCode],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> updateEndpoint() => (super.noSuchMethod(
+ Invocation.method(
+ #updateEndpoint,
+ [],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> terminateEndpoint() => (super.noSuchMethod(
+ Invocation.method(
+ #terminateEndpoint,
+ [],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<List<_i3.MobileKeysKey>> listMobileKeys() => (super.noSuchMethod(
+ Invocation.method(
+ #listMobileKeys,
+ [],
+ ),
+ returnValue:
+ _i5.Future<List<_i3.MobileKeysKey>>.value(<_i3.MobileKeysKey>[]),
+ ) as _i5.Future<List<_i3.MobileKeysKey>>);
+
+ @override
+ _i5.Future<bool> activateMobileKey(_i3.MobileKeysKey? key) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #activateMobileKey,
+ [key],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<bool> deactivateMobileKey(_i3.MobileKeysKey? key) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #deactivateMobileKey,
+ [key],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<String> generateOTPForKey(_i3.MobileKeysKey? key) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #generateOTPForKey,
+ [key],
+ ),
+ returnValue: _i5.Future<String>.value(_i6.dummyValue<String>(
+ this,
+ Invocation.method(
+ #generateOTPForKey,
+ [key],
+ ),
+ )),
+ ) as _i5.Future<String>);
+
+ @override
+ _i5.Future<int> otpCounterForKey(_i3.MobileKeysKey? key) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #otpCounterForKey,
+ [key],
+ ),
+ returnValue: _i5.Future<int>.value(0),
+ ) as _i5.Future<int>);
+
+ @override
+ _i5.Future<_i3.MobileKeysEndpointInfo> endpointInfo() => (super.noSuchMethod(
+ Invocation.method(
+ #endpointInfo,
+ [],
+ ),
+ returnValue: _i5.Future<_i3.MobileKeysEndpointInfo>.value(
+ _FakeMobileKeysEndpointInfo_3(
+ this,
+ Invocation.method(
+ #endpointInfo,
+ [],
+ ),
+ )),
+ ) as _i5.Future<_i3.MobileKeysEndpointInfo>);
+
+ @override
+ _i5.Future<List<_i3.MobileKeysInfoType>> healthCheck() => (super.noSuchMethod(
+ Invocation.method(
+ #healthCheck,
+ [],
+ ),
+ returnValue: _i5.Future<List<_i3.MobileKeysInfoType>>.value(
+ <_i3.MobileKeysInfoType>[]),
+ ) as _i5.Future<List<_i3.MobileKeysInfoType>>);
+
+ @override
+ _i5.Future<String> apiVersion() => (super.noSuchMethod(
+ Invocation.method(
+ #apiVersion,
+ [],
+ ),
+ returnValue: _i5.Future<String>.value(_i6.dummyValue<String>(
+ this,
+ Invocation.method(
+ #apiVersion,
+ [],
+ ),
+ )),
+ ) as _i5.Future<String>);
+
+ @override
+ _i5.Future<bool> isScanning() => (super.noSuchMethod(
+ Invocation.method(
+ #isScanning,
+ [],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<void> startReaderScan(
+ _i3.MobileKeysScanMode? mode,
+ List<_i3.MobileKeysOpeningType?>? supportedOpeningTypes,
+ List<int?>? lockServiceCodes,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #startReaderScan,
+ [
+ mode,
+ supportedOpeningTypes,
+ lockServiceCodes,
+ ],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> setSupportedOpeningTypes(
+ List<_i3.MobileKeysOpeningType>? supportedOpeningTypes) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #setSupportedOpeningTypes,
+ [supportedOpeningTypes],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> setTimeoutConfiguration(
+ _i3.MobileKeysTimeoutConfiguration? timeoutConfiguration) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #setTimeoutConfiguration,
+ [timeoutConfiguration],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> stopReaderScan() => (super.noSuchMethod(
+ Invocation.method(
+ #stopReaderScan,
+ [],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<_i3.MobileKeysLastAuthenticationInfo> lastAuthenticationInfo() =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #lastAuthenticationInfo,
+ [],
+ ),
+ returnValue: _i5.Future<_i3.MobileKeysLastAuthenticationInfo>.value(
+ _FakeMobileKeysLastAuthenticationInfo_4(
+ this,
+ Invocation.method(
+ #lastAuthenticationInfo,
+ [],
+ ),
+ )),
+ ) as _i5.Future<_i3.MobileKeysLastAuthenticationInfo>);
+
+ @override
+ _i5.Future<List<_i3.MobileKeysReader>> listReaders() => (super.noSuchMethod(
+ Invocation.method(
+ #listReaders,
+ [],
+ ),
+ returnValue: _i5.Future<List<_i3.MobileKeysReader>>.value(
+ <_i3.MobileKeysReader>[]),
+ ) as _i5.Future<List<_i3.MobileKeysReader>>);
+
+ @override
+ _i5.Future<_i3.MobileKeysReader?> closestReaderWithinRangeOfOpeningType(
+ _i3.MobileKeysOpeningType? type) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #closestReaderWithinRangeOfOpeningType,
+ [type],
+ ),
+ returnValue: _i5.Future<_i3.MobileKeysReader?>.value(),
+ ) as _i5.Future<_i3.MobileKeysReader?>);
+
+ @override
+ _i5.Future<void> connectToReader(
+ _i3.MobileKeysReader? reader,
+ _i3.MobileKeysOpeningType? openingType,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #connectToReader,
+ [
+ reader,
+ openingType,
+ ],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> forceConnectToReader(
+ _i3.MobileKeysReader? reader,
+ _i3.MobileKeysOpeningType? openingType,
+ ) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #forceConnectToReader,
+ [
+ reader,
+ openingType,
+ ],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> cancelReaderConnection(_i3.MobileKeysReader? reader) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #cancelReaderConnection,
+ [reader],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> openClosestReader() => (super.noSuchMethod(
+ Invocation.method(
+ #openClosestReader,
+ [],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> removeRootOpeningTrigger() => (super.noSuchMethod(
+ Invocation.method(
+ #removeRootOpeningTrigger,
+ [],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<void> setRootOpeningTrigger() => (super.noSuchMethod(
+ Invocation.method(
+ #setRootOpeningTrigger,
+ [],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+
+ @override
+ _i5.Future<bool> isAnalyticsEnabled() => (super.noSuchMethod(
+ Invocation.method(
+ #isAnalyticsEnabled,
+ [],
+ ),
+ returnValue: _i5.Future<bool>.value(false),
+ ) as _i5.Future<bool>);
+
+ @override
+ _i5.Future<void> analytics(bool? enable) => (super.noSuchMethod(
+ Invocation.method(
+ #analytics,
+ [enable],
+ ),
+ returnValue: _i5.Future<void>.value(),
+ returnValueForMissingStub: _i5.Future<void>.value(),
+ ) as _i5.Future<void>);
+}
diff --git a/comwell_key_app/test/welcome_test/welcome_bloc_test.dart b/comwell_key_app/test/welcome_test/welcome_bloc_test.dart
index 40015d0d..ed71206c 100644
--- a/comwell_key_app/test/welcome_test/welcome_bloc_test.dart
+++ b/comwell_key_app/test/welcome_test/welcome_bloc_test.dart
@@ -1,14 +1,16 @@
import 'package:bloc_test/bloc_test.dart';
import 'package:comwell_key_app/welcome/bloc/welcome_bloc.dart';
import 'package:comwell_key_app/welcome/welcome_repository.dart';
-
+import 'welcome_bloc_test.mocks.dart';
import 'package:flutter_test/flutter_test.dart';
+import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
// Mock the WelcomeRepository
-class MockWelcomeRepository extends Mock implements WelcomeRepository {}
+
+@GenerateMocks([WelcomeRepository])
void main() {
group('WelcomeBloc', () {
late WelcomeRepository welcomeRepository;
@@ -30,8 +32,8 @@ void main() {
blocTest<WelcomeBloc, WelcomeState>(
'emits [setupStarted, setupComplete] when setup is successful',
build: () {
- when(() => welcomeRepository.startMobilePlugin())
- .thenAnswer((_) async => true);
+ when(welcomeRepository.startMobilePlugin())
+ .thenAnswer( (_) async => Future.value(true));
return welcomeBloc;
},
act: (bloc) => bloc.add(WelcomeSetupStarted()),
@@ -44,8 +46,8 @@ void main() {
blocTest<WelcomeBloc, WelcomeState>(
'emits [setupStarted, setupNotComplete] when setup is not successful',
build: () {
- when(() => welcomeRepository.startMobilePlugin())
- .thenAnswer((_) async => false);
+ when(welcomeRepository.startMobilePlugin())
+ .thenAnswer((_) async => Future.value(false));
return welcomeBloc;
},
act: (bloc) => bloc.add(WelcomeSetupStarted()),
@@ -58,8 +60,8 @@ void main() {
blocTest<WelcomeBloc, WelcomeState>(
'emits [setupStarted, setupError] when setup throws an exception',
build: () {
- when(() => welcomeRepository.startMobilePlugin())
- .thenThrow(Exception('Setup failed'));
+ when( welcomeRepository.startMobilePlugin())
+ .thenThrow(Exception('oops'));
return welcomeBloc;
},
act: (bloc) => bloc.add(WelcomeSetupStarted()),
diff --git a/comwell_key_app/test/welcome_test/welcome_bloc_test.mocks.dart b/comwell_key_app/test/welcome_test/welcome_bloc_test.mocks.dart
new file mode 100644
index 00000000..0ef4d0c1
--- /dev/null
+++ b/comwell_key_app/test/welcome_test/welcome_bloc_test.mocks.dart
@@ -0,0 +1,61 @@
+// Mocks generated by Mockito 5.4.4 from annotations
+// in comwell_key_app/test/welcome_test/welcome_bloc_test.dart.
+// Do not manually edit this file.
+
+// ignore_for_file: no_leading_underscores_for_library_prefixes
+import 'dart:async' as _i3;
+
+import 'package:comwell_key_app/welcome/welcome_repository.dart' as _i2;
+import 'package:mockito/mockito.dart' as _i1;
+
+// 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
+
+/// A class which mocks [WelcomeRepository].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockWelcomeRepository extends _i1.Mock implements _i2.WelcomeRepository {
+ MockWelcomeRepository() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i3.Future<String?> doesInvitationCodeExist(String? key) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #doesInvitationCodeExist,
+ [key],
+ ),
+ returnValue: _i3.Future<String?>.value(),
+ ) as _i3.Future<String?>);
+
+ @override
+ _i3.Future<bool> startMobilePlugin() => (super.noSuchMethod(
+ Invocation.method(
+ #startMobilePlugin,
+ [],
+ ),
+ returnValue: _i3.Future<bool>.value(false),
+ ) as _i3.Future<bool>);
+
+ @override
+ _i3.Future<bool?> isEndpointSetup({bool? firstLaunch = true}) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #isEndpointSetup,
+ [],
+ {#firstLaunch: firstLaunch},
+ ),
+ returnValue: _i3.Future<bool?>.value(),
+ ) as _i3.Future<bool?>);
+}