From 34f206bba00401ca65c42c85988038f6cde9916f Mon Sep 17 00:00:00 2001 From: HuyNguyen Date: Thu, 13 Jun 2024 10:59:21 +0700 Subject: [PATCH] TW-1825: Write unit test for this case --- .gitignore | 6 +- .../contacts_view_controller_mixin_test.dart | 2758 ++++++ ...acts_view_controller_mixin_test.mocks.dart | 8654 +++++++++++++++++ 3 files changed, 11416 insertions(+), 2 deletions(-) create mode 100644 test/mixin/contacts_view_controller_mixin_test.dart create mode 100644 test/mixin/contacts_view_controller_mixin_test.mocks.dart diff --git a/.gitignore b/.gitignore index ffacbe6231..b21c33414b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,10 @@ .history .svn/ prime + +#generated file *.g.dart +**/*.mocks.dart # libolm package /assets/js/package @@ -61,5 +64,4 @@ ios/Podfile.lock /linux/out /macos/out .vs -olm -test/interceptor/*.mocks.dart +olm \ No newline at end of file diff --git a/test/mixin/contacts_view_controller_mixin_test.dart b/test/mixin/contacts_view_controller_mixin_test.dart new file mode 100644 index 0000000000..bc64c6c9ce --- /dev/null +++ b/test/mixin/contacts_view_controller_mixin_test.dart @@ -0,0 +1,2758 @@ +import 'package:dartz/dartz.dart'; +import 'package:debounce_throttle/debounce_throttle.dart'; +import 'package:fluffychat/app_state/success.dart'; +import 'package:fluffychat/domain/app_state/contact/get_contacts_state.dart'; +import 'package:fluffychat/domain/app_state/contact/get_phonebook_contacts_state.dart'; +import 'package:fluffychat/domain/model/contact/contact_status.dart'; +import 'package:fluffychat/presentation/mixins/contacts_view_controller_mixin.dart'; +import 'package:fluffychat/presentation/model/contact/get_presentation_contacts_success.dart'; +import 'package:fluffychat/presentation/model/search/presentation_search.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:fluffychat/domain/model/contact/contact.dart'; +import 'package:matrix/matrix.dart'; +import 'package:mockito/annotations.dart'; +import 'package:mockito/mockito.dart'; + +import 'contacts_view_controller_mixin_test.mocks.dart'; + +class ConcretePresentationSearch extends PresentationSearch { + const ConcretePresentationSearch({ + required String displayName, + required String email, + required String phoneNumber, + required ContactStatus status, + }) : super( + displayName: displayName, + email: email, + ); + + @override + String get id => "@test:domain.com"; +} + +@GenerateNiceMocks([ + MockSpec(), + MockSpec(), + MockSpec(), +]) +void main() { + const debouncerIntervalInMilliseconds = 300; + + final List tomContacts = [ + const Contact( + email: "alice1@domain.com", + displayName: "Alice 1", + matrixId: "@alice1:domain.com", + phoneNumber: "07 81 12 38 61", + status: ContactStatus.active, + ), + const Contact( + email: "alice2@domain.com", + displayName: "Alice 2", + matrixId: "@alice2:domain.com", + phoneNumber: "02 81 12 38 61", + status: ContactStatus.active, + ), + const Contact( + email: "alice3@domain.com", + displayName: "Alice 3", + matrixId: "@alice3:domain.com", + phoneNumber: "03 81 12 38 61", + status: ContactStatus.active, + ), + const Contact( + email: "alice4@domain.com", + displayName: "Alice 4", + matrixId: "@alice4:domain.com", + phoneNumber: "04 81 12 38 61", + status: ContactStatus.inactive, + ), + const Contact( + email: "alice5@domain.com", + displayName: "Alice 5", + matrixId: "@alice5:domain.com", + phoneNumber: "05 81 12 38 61", + status: ContactStatus.inactive, + ), + ]; + + final List phonebookContacts = [ + const Contact( + email: "bob@domain.com", + displayName: "BoB", + ), + const Contact( + displayName: "BoB1", + phoneNumber: "11 22 33 44 55", + ), + const Contact( + email: "bob2@domain.com", + displayName: "BoB2", + phoneNumber: "+84000000000", + ), + const Contact( + email: "bob3@domain.com", + displayName: "BoB 3", + ), + const Contact( + email: "bob@domain.com", + displayName: "BoB", + ), + ]; + + final List recentContacts = [ + const ConcretePresentationSearch( + displayName: "Alice test", + email: "alicetest@domain.com", + phoneNumber: "+84111111111", + status: ContactStatus.active, + ), + ]; + + late MockContactsViewControllerMixin mockContactsViewControllerMixin; + late Client mockClient; + late MatrixLocalizations mockMatrixLocalizations; + + setUp(() { + mockContactsViewControllerMixin = MockContactsViewControllerMixin(); + mockMatrixLocalizations = MockMatrixLocalizations(); + mockClient = MockClient(); + }); + + group('Test ContactsViewControllerMixin on Web', () { + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is empty.\n' + 'AND presentationContactNotifier return GetContactsIsEmpty' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () { + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value, + [], + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsIsEmpty' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () { + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn(ValueNotifier(const Left(GetContactsIsEmpty()))); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn(ValueNotifier(const Right(GetPhonebookContactsInitial()))); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsSuccess' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () { + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(Right(GetContactsSuccess(contacts: tomContacts))), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn(ValueNotifier(const Right(GetPhonebookContactsInitial()))); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + Right(GetContactsSuccess(contacts: tomContacts)), + ); + + final presentationContact = mockContactsViewControllerMixin + .presentationContactNotifier.value + .getSuccessOrNull(); + + expect( + presentationContact is GetContactsSuccess, + true, + ); + + expect( + (presentationContact as GetContactsSuccess).contacts.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is empty.\n' + 'AND presentationContactNotifier return GetContactsFailure' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsFailure state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () { + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier( + const Left(GetContactsFailure(keyword: '', exception: dynamic)), + ), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn(ValueNotifier(const Right(GetPhonebookContactsInitial()))); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsFailure(keyword: '', exception: dynamic)), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is empty.\n' + 'AND presentationContactNotifier return GetContactsIsEmpty' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n' + 'AFTER that, enable search mode with keyword is 123' + 'THEN search by keyword return no result' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeyword = '123'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value, + [], + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeyword; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeyword, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeyword); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value, + [], + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsIsEmpty' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n' + 'AFTER that, enable search mode with keyword is 123' + 'THEN search by keyword return no result' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeyword = '123'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeyword; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeyword, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeyword); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsSuccess' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n' + 'AFTER that, enable search mode with keyword is 123' + 'THEN search by keyword return no result' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeyword = '123'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(Right(GetContactsSuccess(contacts: tomContacts))), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + Right(GetContactsSuccess(contacts: tomContacts)), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeyword; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeyword, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeyword); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsSuccess' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n' + 'AFTER that, enable search mode' + 'THEN search by keyword return contacts with keyword a' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeyword = 'a'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(Right(GetContactsSuccess(contacts: tomContacts))), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + Right(GetContactsSuccess(contacts: tomContacts)), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeyword; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier( + Right( + GetPresentationContactsSuccess( + contacts: tomContacts, + keyword: searchKeyword, + ), + ), + ), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeyword, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeyword); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.first.displayName, + 'Alice test', + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value + .getSuccessOrNull() is GetPresentationContactsSuccess, + true, + ); + + final presentationContact = mockContactsViewControllerMixin + .presentationContactNotifier.value + .getSuccessOrNull() as GetPresentationContactsSuccess; + + expect(presentationContact.keyword, keyword); + + expect(presentationContact.contacts.isNotEmpty, true); + + expect(presentationContact.contacts.length, 5); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsSuccess' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsInitial.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n' + 'AFTER that, enable search mode' + '[Search 1] search by keyword return contacts with keyword A' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n' + '[Search 2] search by keyword return contacts with keyword Alice test' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsInitial state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeywordFirst = 'A'; + const searchKeywordSecond = 'Alice test'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(Right(GetContactsSuccess(contacts: tomContacts))), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + Right(GetContactsSuccess(contacts: tomContacts)), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeywordFirst; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier( + Right( + GetPresentationContactsSuccess( + contacts: tomContacts, + keyword: searchKeywordFirst, + ), + ), + ), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeywordFirst, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeywordFirst); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.first.displayName, + 'Alice test', + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value + .getSuccessOrNull() is GetPresentationContactsSuccess, + true, + ); + + final presentationContact = mockContactsViewControllerMixin + .presentationContactNotifier.value + .getSuccessOrNull() as GetPresentationContactsSuccess; + + expect(presentationContact.keyword, keyword); + + expect(presentationContact.contacts.isNotEmpty, true); + + expect(presentationContact.contacts.length, 5); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeywordSecond; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier( + const Right( + GetPresentationContactsSuccess( + contacts: [], + keyword: searchKeywordSecond, + ), + ), + ), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Right(GetPhonebookContactsInitial())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeywordSecond, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeywordSecond); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.first.displayName, + 'Alice test', + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value + .getSuccessOrNull() is GetPresentationContactsSuccess, + true, + ); + + final presentationContactTwo = mockContactsViewControllerMixin + .presentationContactNotifier.value + .getSuccessOrNull() as GetPresentationContactsSuccess; + + expect(presentationContactTwo.keyword, searchKeywordSecond); + + expect(presentationContactTwo.contacts.isNotEmpty, false); + + expect(presentationContactTwo.contacts.length, 0); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Right(GetPhonebookContactsInitial()), + ); + }, + ); + }); + + group('Test ContactsViewControllerMixin on Mobile', () { + test( + 'WHEN it is available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is empty.\n' + 'AND presentationContactNotifier return GetContactsIsEmpty' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsIsEmpty.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n', + () { + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value, + [], + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + }, + ); + + test( + 'WHEN it is available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsIsEmpty' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsIsEmpty.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n', + () { + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn(ValueNotifier(const Left(GetContactsIsEmpty()))); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn(ValueNotifier(const Left(GetPhonebookContactsIsEmpty()))); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + }, + ); + + test( + 'WHEN it is available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsSuccess' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsSuccess.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsSuccess state.\n', + () { + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(Right(GetContactsSuccess(contacts: tomContacts))), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier( + Right(GetPhonebookContactsSuccess(contacts: phonebookContacts)), + ), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + Right(GetContactsSuccess(contacts: tomContacts)), + ); + + final presentationContact = mockContactsViewControllerMixin + .presentationContactNotifier.value + .getSuccessOrNull(); + + expect( + presentationContact is GetContactsSuccess, + true, + ); + + expect( + (presentationContact as GetContactsSuccess).contacts.isNotEmpty, + true, + ); + + final presentationPhonebookContact = mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value + .getSuccessOrNull(); + + expect( + presentationPhonebookContact is GetPhonebookContactsSuccess, + true, + ); + + expect( + (presentationPhonebookContact as GetPhonebookContactsSuccess) + .contacts + .isNotEmpty, + true, + ); + }, + ); + + test( + 'WHEN it is available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is empty.\n' + 'AND presentationContactNotifier return GetContactsFailure' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsFailure.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsFailure state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsFailure state.\n', + () { + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier( + const Left(GetContactsFailure(keyword: '', exception: dynamic)), + ), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier( + const Left(GetPhonebookContactsFailure(exception: dynamic)), + ), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsFailure(keyword: '', exception: dynamic)), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsFailure(exception: dynamic)), + ); + }, + ); + + test( + 'WHEN it is available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is empty.\n' + 'AND presentationContactNotifier return GetContactsIsEmpty' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsIsEmpty.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n' + 'AFTER that, enable search mode with keyword is 123' + 'THEN search by keyword return no result' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeyword = '123'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value, + [], + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeyword; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeyword, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeyword); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value, + [], + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + }, + ); + + test( + 'WHEN it is available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsIsEmpty' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsIsEmpty.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n' + 'AFTER that, enable search mode with keyword is 123' + 'THEN search by keyword return no result' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeyword = '123'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeyword; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeyword, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeyword); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsSuccess' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsSuccess.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n' + 'AFTER that, enable search mode with keyword is 123' + 'THEN search by keyword return no result' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeyword = '123'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(Right(GetContactsSuccess(contacts: tomContacts))), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier( + Right(GetPhonebookContactsSuccess(contacts: phonebookContacts)), + ), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + Right(GetContactsSuccess(contacts: tomContacts)), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + Right(GetPhonebookContactsSuccess(contacts: phonebookContacts)), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeyword; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier([])); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetContactsIsEmpty())), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeyword, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeyword); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + const Left(GetContactsIsEmpty()), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsSuccess' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsSuccess.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsSuccess state.\n' + 'AFTER that, enable search mode' + 'THEN search by keyword return contacts with keyword a' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeyword = 'a'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(Right(GetContactsSuccess(contacts: tomContacts))), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier( + Right(GetPhonebookContactsSuccess(contacts: phonebookContacts)), + ), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + Right(GetContactsSuccess(contacts: tomContacts)), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + Right(GetPhonebookContactsSuccess(contacts: phonebookContacts)), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeyword; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier( + Right( + GetPresentationContactsSuccess( + contacts: tomContacts, + keyword: searchKeyword, + ), + ), + ), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeyword, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeyword); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.first.displayName, + 'Alice test', + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value + .getSuccessOrNull() is GetPresentationContactsSuccess, + true, + ); + + final presentationContact = mockContactsViewControllerMixin + .presentationContactNotifier.value + .getSuccessOrNull() as GetPresentationContactsSuccess; + + expect(presentationContact.keyword, keyword); + + expect(presentationContact.contacts.isNotEmpty, true); + + expect(presentationContact.contacts.length, 5); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + }, + ); + + test( + 'WHEN it is not available get Phonebook contact.\n' + 'AND search mode is disable.\n' + 'AND presentationRecentContactNotifier return SearchRecentChatSuccess with contacts is not empty.\n' + 'AND presentationContactNotifier return GetContactsSuccess' + 'AND presentationPhonebookContactNotifier return GetPhonebookContactsSuccess.\n' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsSuccess state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsSuccess state.\n' + 'AFTER that, enable search mode' + '[Search 1] search by keyword return contacts with keyword A' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n' + '[Search 2] search by keyword return contacts with keyword Alice test' + 'THEN presentationRecentContactNotifier SHOULD have SearchRecentChatSuccess state.\n' + 'THEN presentationContactNotifier SHOULD have GetContactsIsEmpty state.\n' + 'THEN presentationPhonebookContactNotifier SHOULD have GetPhonebookContactsIsEmpty state.\n', + () async { + final Debouncer debouncer = Debouncer( + const Duration(milliseconds: debouncerIntervalInMilliseconds), + initialValue: '', + ); + + const searchKeywordFirst = 'A'; + const searchKeywordSecond = 'Alice test'; + String? keyword; + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(false)); + + when( + mockContactsViewControllerMixin.textEditingController, + ).thenReturn(TextEditingController()); + + mockContactsViewControllerMixin.textEditingController.addListener(() { + debouncer.value = + mockContactsViewControllerMixin.textEditingController.text; + }); + + debouncer.values.listen((value) { + keyword = value; + }); + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier(Right(GetContactsSuccess(contacts: tomContacts))), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier( + Right(GetPhonebookContactsSuccess(contacts: phonebookContacts)), + ), + ); + + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + verify( + mockContactsViewControllerMixin.initialFetchContacts( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value, + Right(GetContactsSuccess(contacts: tomContacts)), + ); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + Right(GetPhonebookContactsSuccess(contacts: phonebookContacts)), + ); + + when( + mockContactsViewControllerMixin.isSearchModeNotifier, + ).thenReturn(ValueNotifier(true)); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeywordFirst; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier( + Right( + GetPresentationContactsSuccess( + contacts: tomContacts, + keyword: searchKeywordFirst, + ), + ), + ), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeywordFirst, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeywordFirst); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.first.displayName, + 'Alice test', + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value + .getSuccessOrNull() is GetPresentationContactsSuccess, + true, + ); + + final presentationContact = mockContactsViewControllerMixin + .presentationContactNotifier.value + .getSuccessOrNull() as GetPresentationContactsSuccess; + + expect(presentationContact.keyword, keyword); + + expect(presentationContact.contacts.isNotEmpty, true); + + expect(presentationContact.contacts.length, 5); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + + mockContactsViewControllerMixin.textEditingController.text = + searchKeywordSecond; + + when( + mockContactsViewControllerMixin.presentationRecentContactNotifier, + ).thenReturn(ValueNotifier(recentContacts)); + + when( + mockContactsViewControllerMixin.presentationContactNotifier, + ).thenReturn( + ValueNotifier( + const Right( + GetPresentationContactsSuccess( + contacts: [], + keyword: searchKeywordSecond, + ), + ), + ), + ); + + when( + mockContactsViewControllerMixin.presentationPhonebookContactNotifier, + ).thenReturn( + ValueNotifier(const Left(GetPhonebookContactsIsEmpty())), + ); + + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ); + + await Future.delayed(const Duration(seconds: 1)); + + verify( + mockContactsViewControllerMixin.refreshAllContactsTest( + client: mockClient, + matrixLocalizations: mockMatrixLocalizations, + ), + ).called(1); + + expect( + mockContactsViewControllerMixin.isSearchModeNotifier.value, + true, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text.isEmpty, + false, + ); + + expect( + mockContactsViewControllerMixin.textEditingController.text, + searchKeywordSecond, + ); + + expect(keyword != null, true); + + expect(keyword, searchKeywordSecond); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.isNotEmpty, + true, + ); + + expect( + mockContactsViewControllerMixin + .presentationRecentContactNotifier.value.first.displayName, + 'Alice test', + ); + + expect( + mockContactsViewControllerMixin.presentationContactNotifier.value + .getSuccessOrNull() is GetPresentationContactsSuccess, + true, + ); + + final presentationContactTwo = mockContactsViewControllerMixin + .presentationContactNotifier.value + .getSuccessOrNull() as GetPresentationContactsSuccess; + + expect(presentationContactTwo.keyword, searchKeywordSecond); + + expect(presentationContactTwo.contacts.isNotEmpty, false); + + expect(presentationContactTwo.contacts.length, 0); + + expect( + mockContactsViewControllerMixin + .presentationPhonebookContactNotifier.value, + const Left(GetPhonebookContactsIsEmpty()), + ); + }, + ); + }); +} diff --git a/test/mixin/contacts_view_controller_mixin_test.mocks.dart b/test/mixin/contacts_view_controller_mixin_test.mocks.dart new file mode 100644 index 0000000000..60edc8b8f8 --- /dev/null +++ b/test/mixin/contacts_view_controller_mixin_test.mocks.dart @@ -0,0 +1,8654 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in fluffychat/test/mixin/contacts_view_controller_mixin_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i5; +import 'dart:typed_data' as _i11; + +import 'package:dartz/dartz.dart' as _i15; +import 'package:fluffychat/app_state/failure.dart' as _i16; +import 'package:fluffychat/app_state/success.dart' as _i17; +import 'package:fluffychat/domain/contact_manager/contacts_manager.dart' as _i8; +import 'package:fluffychat/presentation/enum/contacts/warning_contacts_banner_enum.dart' + as _i13; +import 'package:fluffychat/presentation/mixins/contacts_view_controller_mixin.dart' + as _i12; +import 'package:fluffychat/presentation/model/search/presentation_search.dart' + as _i14; +import 'package:flutter/material.dart' as _i7; +import 'package:http/http.dart' as _i4; +import 'package:matrix/encryption.dart' as _i9; +import 'package:matrix/matrix.dart' as _i2; +import 'package:matrix/src/utils/cached_stream_controller.dart' as _i3; +import 'package:matrix_api_lite/src/generated/fixed_model.dart' as _i6; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i10; +import 'package:permission_handler/permission_handler.dart' as _i18; + +// 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 _FakeFilter_0 extends _i1.SmartFake implements _i2.Filter { + _FakeFilter_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeNativeImplementations_1 extends _i1.SmartFake + implements _i2.NativeImplementations { + _FakeNativeImplementations_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDuration_2 extends _i1.SmartFake implements Duration { + _FakeDuration_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCachedStreamController_3 extends _i1.SmartFake + implements _i3.CachedStreamController { + _FakeCachedStreamController_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePushruleEvaluator_4 extends _i1.SmartFake + implements _i2.PushruleEvaluator { + _FakePushruleEvaluator_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeProfile_5 extends _i1.SmartFake implements _i2.Profile { + _FakeProfile_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeClient_6 extends _i1.SmartFake implements _i4.Client { + _FakeClient_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFuture_7 extends _i1.SmartFake implements _i5.Future { + _FakeFuture_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDiscoveryInformation_8 extends _i1.SmartFake + implements _i2.DiscoveryInformation { + _FakeDiscoveryInformation_8( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeHomeserverSummary_9 extends _i1.SmartFake + implements _i2.HomeserverSummary { + _FakeHomeserverSummary_9( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRegisterResponse_10 extends _i1.SmartFake + implements _i2.RegisterResponse { + _FakeRegisterResponse_10( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeLoginResponse_11 extends _i1.SmartFake implements _i2.LoginResponse { + _FakeLoginResponse_11( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSyncUpdate_12 extends _i1.SmartFake implements _i2.SyncUpdate { + _FakeSyncUpdate_12( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeUri_13 extends _i1.SmartFake implements Uri { + _FakeUri_13( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTurnServerCredentials_14 extends _i1.SmartFake + implements _i2.TurnServerCredentials { + _FakeTurnServerCredentials_14( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRoomKeysUpdateResponse_15 extends _i1.SmartFake + implements _i2.RoomKeysUpdateResponse { + _FakeRoomKeysUpdateResponse_15( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeKeyBackupData_16 extends _i1.SmartFake implements _i2.KeyBackupData { + _FakeKeyBackupData_16( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetSpaceHierarchyResponse_17 extends _i1.SmartFake + implements _i2.GetSpaceHierarchyResponse { + _FakeGetSpaceHierarchyResponse_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetRelatingEventsResponse_18 extends _i1.SmartFake + implements _i2.GetRelatingEventsResponse { + _FakeGetRelatingEventsResponse_18( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetRelatingEventsWithRelTypeResponse_19 extends _i1.SmartFake + implements _i2.GetRelatingEventsWithRelTypeResponse { + _FakeGetRelatingEventsWithRelTypeResponse_19( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetRelatingEventsWithRelTypeAndEventTypeResponse_20 extends _i1 + .SmartFake implements _i2.GetRelatingEventsWithRelTypeAndEventTypeResponse { + _FakeGetRelatingEventsWithRelTypeAndEventTypeResponse_20( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetThreadRootsResponse_21 extends _i1.SmartFake + implements _i2.GetThreadRootsResponse { + _FakeGetThreadRootsResponse_21( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetEventByTimestampResponse_22 extends _i1.SmartFake + implements _i2.GetEventByTimestampResponse { + _FakeGetEventByTimestampResponse_22( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRequestTokenResponse_23 extends _i1.SmartFake + implements _i2.RequestTokenResponse { + _FakeRequestTokenResponse_23( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTokenOwnerInfo_24 extends _i1.SmartFake + implements _i2.TokenOwnerInfo { + _FakeTokenOwnerInfo_24( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeWhoIsInfo_25 extends _i1.SmartFake implements _i2.WhoIsInfo { + _FakeWhoIsInfo_25( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeCapabilities_26 extends _i1.SmartFake implements _i2.Capabilities { + _FakeCapabilities_26( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeDevice_27 extends _i1.SmartFake implements _i2.Device { + _FakeDevice_27( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetRoomIdByAliasResponse_28 extends _i1.SmartFake + implements _i2.GetRoomIdByAliasResponse { + _FakeGetRoomIdByAliasResponse_28( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetEventsResponse_29 extends _i1.SmartFake + implements _i2.GetEventsResponse { + _FakeGetEventsResponse_29( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePeekEventsResponse_30 extends _i1.SmartFake + implements _i2.PeekEventsResponse { + _FakePeekEventsResponse_30( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeMatrixEvent_31 extends _i1.SmartFake implements _i2.MatrixEvent { + _FakeMatrixEvent_31( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetKeysChangesResponse_32 extends _i1.SmartFake + implements _i2.GetKeysChangesResponse { + _FakeGetKeysChangesResponse_32( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeClaimKeysResponse_33 extends _i1.SmartFake + implements _i2.ClaimKeysResponse { + _FakeClaimKeysResponse_33( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeQueryKeysResponse_34 extends _i1.SmartFake + implements _i2.QueryKeysResponse { + _FakeQueryKeysResponse_34( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetNotificationsResponse_35 extends _i1.SmartFake + implements _i2.GetNotificationsResponse { + _FakeGetNotificationsResponse_35( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetPresenceResponse_36 extends _i1.SmartFake + implements _i2.GetPresenceResponse { + _FakeGetPresenceResponse_36( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeProfileInformation_37 extends _i1.SmartFake + implements _i2.ProfileInformation { + _FakeProfileInformation_37( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetPublicRoomsResponse_38 extends _i1.SmartFake + implements _i2.GetPublicRoomsResponse { + _FakeGetPublicRoomsResponse_38( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeQueryPublicRoomsResponse_39 extends _i1.SmartFake + implements _i2.QueryPublicRoomsResponse { + _FakeQueryPublicRoomsResponse_39( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePushRuleSet_40 extends _i1.SmartFake implements _i2.PushRuleSet { + _FakePushRuleSet_40( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakePushRule_41 extends _i1.SmartFake implements _i2.PushRule { + _FakePushRule_41( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRefreshResponse_42 extends _i1.SmartFake + implements _i2.RefreshResponse { + _FakeRefreshResponse_42( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRoomKeys_43 extends _i1.SmartFake implements _i2.RoomKeys { + _FakeRoomKeys_43( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeRoomKeyBackup_44 extends _i1.SmartFake implements _i2.RoomKeyBackup { + _FakeRoomKeyBackup_44( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetRoomKeysVersionCurrentResponse_45 extends _i1.SmartFake + implements _i2.GetRoomKeysVersionCurrentResponse { + _FakeGetRoomKeysVersionCurrentResponse_45( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetRoomKeysVersionResponse_46 extends _i1.SmartFake + implements _i2.GetRoomKeysVersionResponse { + _FakeGetRoomKeysVersionResponse_46( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeEventContext_47 extends _i1.SmartFake implements _i2.EventContext { + _FakeEventContext_47( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetRoomEventsResponse_48 extends _i1.SmartFake + implements _i2.GetRoomEventsResponse { + _FakeGetRoomEventsResponse_48( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSearchResults_49 extends _i1.SmartFake implements _i2.SearchResults { + _FakeSearchResults_49( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeProtocol_50 extends _i1.SmartFake implements _i2.Protocol { + _FakeProtocol_50( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeOpenIdCredentials_51 extends _i1.SmartFake + implements _i2.OpenIdCredentials { + _FakeOpenIdCredentials_51( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeSearchUserDirectoryResponse_52 extends _i1.SmartFake + implements _i2.SearchUserDirectoryResponse { + _FakeSearchUserDirectoryResponse_52( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetVersionsResponse_53 extends _i1.SmartFake + implements _i2.GetVersionsResponse { + _FakeGetVersionsResponse_53( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeServerConfig_54 extends _i1.SmartFake implements _i2.ServerConfig { + _FakeServerConfig_54( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFileResponse_55 extends _i1.SmartFake implements _i6.FileResponse { + _FakeFileResponse_55( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGetUrlPreviewResponse_56 extends _i1.SmartFake + implements _i2.GetUrlPreviewResponse { + _FakeGetUrlPreviewResponse_56( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTextEditingController_57 extends _i1.SmartFake + implements _i7.TextEditingController { + _FakeTextEditingController_57( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeValueNotifier_58 extends _i1.SmartFake + implements _i7.ValueNotifier { + _FakeValueNotifier_58( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeFocusNode_59 extends _i1.SmartFake implements _i7.FocusNode { + _FakeFocusNode_59( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + + @override + String toString({_i7.DiagnosticLevel? minLevel = _i7.DiagnosticLevel.info}) => + super.toString(); +} + +class _FakeContactsManager_60 extends _i1.SmartFake + implements _i8.ContactsManager { + _FakeContactsManager_60( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [Client]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockClient extends _i1.Mock implements _i2.Client { + @override + set encryption(_i9.Encryption? _encryption) => super.noSuchMethod( + Invocation.setter( + #encryption, + _encryption, + ), + returnValueForMissingStub: null, + ); + + @override + Set<_i9.KeyVerificationMethod> get verificationMethods => (super.noSuchMethod( + Invocation.getter(#verificationMethods), + returnValue: <_i9.KeyVerificationMethod>{}, + returnValueForMissingStub: <_i9.KeyVerificationMethod>{}, + ) as Set<_i9.KeyVerificationMethod>); + + @override + set verificationMethods( + Set<_i9.KeyVerificationMethod>? _verificationMethods) => + super.noSuchMethod( + Invocation.setter( + #verificationMethods, + _verificationMethods, + ), + returnValueForMissingStub: null, + ); + + @override + Set get importantStateEvents => (super.noSuchMethod( + Invocation.getter(#importantStateEvents), + returnValue: {}, + returnValueForMissingStub: {}, + ) as Set); + + @override + set importantStateEvents(Set? _importantStateEvents) => + super.noSuchMethod( + Invocation.setter( + #importantStateEvents, + _importantStateEvents, + ), + returnValueForMissingStub: null, + ); + + @override + Set get roomPreviewLastEvents => (super.noSuchMethod( + Invocation.getter(#roomPreviewLastEvents), + returnValue: {}, + returnValueForMissingStub: {}, + ) as Set); + + @override + set roomPreviewLastEvents(Set? _roomPreviewLastEvents) => + super.noSuchMethod( + Invocation.setter( + #roomPreviewLastEvents, + _roomPreviewLastEvents, + ), + returnValueForMissingStub: null, + ); + + @override + Set get supportedLoginTypes => (super.noSuchMethod( + Invocation.getter(#supportedLoginTypes), + returnValue: {}, + returnValueForMissingStub: {}, + ) as Set); + + @override + set supportedLoginTypes(Set? _supportedLoginTypes) => + super.noSuchMethod( + Invocation.setter( + #supportedLoginTypes, + _supportedLoginTypes, + ), + returnValueForMissingStub: null, + ); + + @override + int get sendMessageTimeoutSeconds => (super.noSuchMethod( + Invocation.getter(#sendMessageTimeoutSeconds), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + + @override + set sendMessageTimeoutSeconds(int? _sendMessageTimeoutSeconds) => + super.noSuchMethod( + Invocation.setter( + #sendMessageTimeoutSeconds, + _sendMessageTimeoutSeconds, + ), + returnValueForMissingStub: null, + ); + + @override + bool get requestHistoryOnLimitedTimeline => (super.noSuchMethod( + Invocation.getter(#requestHistoryOnLimitedTimeline), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + set requestHistoryOnLimitedTimeline(bool? _requestHistoryOnLimitedTimeline) => + super.noSuchMethod( + Invocation.setter( + #requestHistoryOnLimitedTimeline, + _requestHistoryOnLimitedTimeline, + ), + returnValueForMissingStub: null, + ); + + @override + bool get formatLocalpart => (super.noSuchMethod( + Invocation.getter(#formatLocalpart), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + bool get mxidLocalPartFallback => (super.noSuchMethod( + Invocation.getter(#mxidLocalPartFallback), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + bool get shareKeysWithUnverifiedDevices => (super.noSuchMethod( + Invocation.getter(#shareKeysWithUnverifiedDevices), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + set shareKeysWithUnverifiedDevices(bool? _shareKeysWithUnverifiedDevices) => + super.noSuchMethod( + Invocation.setter( + #shareKeysWithUnverifiedDevices, + _shareKeysWithUnverifiedDevices, + ), + returnValueForMissingStub: null, + ); + + @override + Map Function(_i2.CommandArgs)> get commands => + (super.noSuchMethod( + Invocation.getter(#commands), + returnValue: Function(_i2.CommandArgs)>{}, + returnValueForMissingStub: Function(_i2.CommandArgs)>{}, + ) as Map Function(_i2.CommandArgs)>); + + @override + _i2.Filter get syncFilter => (super.noSuchMethod( + Invocation.getter(#syncFilter), + returnValue: _FakeFilter_0( + this, + Invocation.getter(#syncFilter), + ), + returnValueForMissingStub: _FakeFilter_0( + this, + Invocation.getter(#syncFilter), + ), + ) as _i2.Filter); + + @override + _i2.NativeImplementations get nativeImplementations => (super.noSuchMethod( + Invocation.getter(#nativeImplementations), + returnValue: _FakeNativeImplementations_1( + this, + Invocation.getter(#nativeImplementations), + ), + returnValueForMissingStub: _FakeNativeImplementations_1( + this, + Invocation.getter(#nativeImplementations), + ), + ) as _i2.NativeImplementations); + + @override + set syncFilterId(String? _syncFilterId) => super.noSuchMethod( + Invocation.setter( + #syncFilterId, + _syncFilterId, + ), + returnValueForMissingStub: null, + ); + + @override + Duration get sendTimelineEventTimeout => (super.noSuchMethod( + Invocation.getter(#sendTimelineEventTimeout), + returnValue: _FakeDuration_2( + this, + Invocation.getter(#sendTimelineEventTimeout), + ), + returnValueForMissingStub: _FakeDuration_2( + this, + Invocation.getter(#sendTimelineEventTimeout), + ), + ) as Duration); + + @override + set customImageResizer( + _i5.Future<_i2.MatrixImageFileResizedResponse?> Function( + _i2.MatrixImageFileResizeArguments)? + _customImageResizer) => + super.noSuchMethod( + Invocation.setter( + #customImageResizer, + _customImageResizer, + ), + returnValueForMissingStub: null, + ); + + @override + String get clientName => (super.noSuchMethod( + Invocation.getter(#clientName), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#clientName), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#clientName), + ), + ) as String); + + @override + set prevBatch(String? _prevBatch) => super.noSuchMethod( + Invocation.setter( + #prevBatch, + _prevBatch, + ), + returnValueForMissingStub: null, + ); + + @override + set initCompleter(_i5.Completer? _initCompleter) => super.noSuchMethod( + Invocation.setter( + #initCompleter, + _initCompleter, + ), + returnValueForMissingStub: null, + ); + + @override + bool get enableDehydratedDevices => (super.noSuchMethod( + Invocation.getter(#enableDehydratedDevices), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + set enableDehydratedDevices(bool? _enableDehydratedDevices) => + super.noSuchMethod( + Invocation.setter( + #enableDehydratedDevices, + _enableDehydratedDevices, + ), + returnValueForMissingStub: null, + ); + + @override + bool get receiptsPublicByDefault => (super.noSuchMethod( + Invocation.getter(#receiptsPublicByDefault), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + set receiptsPublicByDefault(bool? _receiptsPublicByDefault) => + super.noSuchMethod( + Invocation.setter( + #receiptsPublicByDefault, + _receiptsPublicByDefault, + ), + returnValueForMissingStub: null, + ); + + @override + Map get presences => (super.noSuchMethod( + Invocation.getter(#presences), + returnValue: {}, + returnValueForMissingStub: {}, + ) as Map); + + @override + set presences(Map? _presences) => + super.noSuchMethod( + Invocation.setter( + #presences, + _presences, + ), + returnValueForMissingStub: null, + ); + + @override + _i3.CachedStreamController<_i2.EventUpdate> get onEvent => + (super.noSuchMethod( + Invocation.getter(#onEvent), + returnValue: _FakeCachedStreamController_3<_i2.EventUpdate>( + this, + Invocation.getter(#onEvent), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.EventUpdate>( + this, + Invocation.getter(#onEvent), + ), + ) as _i3.CachedStreamController<_i2.EventUpdate>); + + @override + _i3.CachedStreamController<_i2.ToDeviceEvent> get onToDeviceEvent => + (super.noSuchMethod( + Invocation.getter(#onToDeviceEvent), + returnValue: _FakeCachedStreamController_3<_i2.ToDeviceEvent>( + this, + Invocation.getter(#onToDeviceEvent), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.ToDeviceEvent>( + this, + Invocation.getter(#onToDeviceEvent), + ), + ) as _i3.CachedStreamController<_i2.ToDeviceEvent>); + + @override + _i3.CachedStreamController<_i2.LoginState> get onLoginStateChanged => + (super.noSuchMethod( + Invocation.getter(#onLoginStateChanged), + returnValue: _FakeCachedStreamController_3<_i2.LoginState>( + this, + Invocation.getter(#onLoginStateChanged), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.LoginState>( + this, + Invocation.getter(#onLoginStateChanged), + ), + ) as _i3.CachedStreamController<_i2.LoginState>); + + @override + _i3.CachedStreamController get onCacheCleared => (super.noSuchMethod( + Invocation.getter(#onCacheCleared), + returnValue: _FakeCachedStreamController_3( + this, + Invocation.getter(#onCacheCleared), + ), + returnValueForMissingStub: _FakeCachedStreamController_3( + this, + Invocation.getter(#onCacheCleared), + ), + ) as _i3.CachedStreamController); + + @override + _i3.CachedStreamController<_i2.SdkError> get onEncryptionError => + (super.noSuchMethod( + Invocation.getter(#onEncryptionError), + returnValue: _FakeCachedStreamController_3<_i2.SdkError>( + this, + Invocation.getter(#onEncryptionError), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.SdkError>( + this, + Invocation.getter(#onEncryptionError), + ), + ) as _i3.CachedStreamController<_i2.SdkError>); + + @override + _i3.CachedStreamController<_i2.SyncUpdate> get onSync => (super.noSuchMethod( + Invocation.getter(#onSync), + returnValue: _FakeCachedStreamController_3<_i2.SyncUpdate>( + this, + Invocation.getter(#onSync), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.SyncUpdate>( + this, + Invocation.getter(#onSync), + ), + ) as _i3.CachedStreamController<_i2.SyncUpdate>); + + @override + _i3.CachedStreamController<_i2.SyncStatusUpdate> get onSyncStatus => + (super.noSuchMethod( + Invocation.getter(#onSyncStatus), + returnValue: _FakeCachedStreamController_3<_i2.SyncStatusUpdate>( + this, + Invocation.getter(#onSyncStatus), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.SyncStatusUpdate>( + this, + Invocation.getter(#onSyncStatus), + ), + ) as _i3.CachedStreamController<_i2.SyncStatusUpdate>); + + @override + _i3.CachedStreamController<_i2.Presence> get onPresence => + (super.noSuchMethod( + Invocation.getter(#onPresence), + returnValue: _FakeCachedStreamController_3<_i2.Presence>( + this, + Invocation.getter(#onPresence), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Presence>( + this, + Invocation.getter(#onPresence), + ), + ) as _i3.CachedStreamController<_i2.Presence>); + + @override + _i3.CachedStreamController<_i2.CachedPresence> get onPresenceChanged => + (super.noSuchMethod( + Invocation.getter(#onPresenceChanged), + returnValue: _FakeCachedStreamController_3<_i2.CachedPresence>( + this, + Invocation.getter(#onPresenceChanged), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.CachedPresence>( + this, + Invocation.getter(#onPresenceChanged), + ), + ) as _i3.CachedStreamController<_i2.CachedPresence>); + + @override + _i3.CachedStreamController<_i2.CachedPresence> get onlatestPresenceChanged => + (super.noSuchMethod( + Invocation.getter(#onlatestPresenceChanged), + returnValue: _FakeCachedStreamController_3<_i2.CachedPresence>( + this, + Invocation.getter(#onlatestPresenceChanged), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.CachedPresence>( + this, + Invocation.getter(#onlatestPresenceChanged), + ), + ) as _i3.CachedStreamController<_i2.CachedPresence>); + + @override + _i3.CachedStreamController<_i2.BasicEvent> get onAccountData => + (super.noSuchMethod( + Invocation.getter(#onAccountData), + returnValue: _FakeCachedStreamController_3<_i2.BasicEvent>( + this, + Invocation.getter(#onAccountData), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.BasicEvent>( + this, + Invocation.getter(#onAccountData), + ), + ) as _i3.CachedStreamController<_i2.BasicEvent>); + + @override + _i3.CachedStreamController<_i2.Event> get onCallInvite => (super.noSuchMethod( + Invocation.getter(#onCallInvite), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallInvite), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallInvite), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onCallHangup => (super.noSuchMethod( + Invocation.getter(#onCallHangup), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallHangup), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallHangup), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onCallCandidates => + (super.noSuchMethod( + Invocation.getter(#onCallCandidates), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallCandidates), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallCandidates), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onCallAnswer => (super.noSuchMethod( + Invocation.getter(#onCallAnswer), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallAnswer), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallAnswer), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onCallReplaces => + (super.noSuchMethod( + Invocation.getter(#onCallReplaces), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallReplaces), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallReplaces), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onCallSelectAnswer => + (super.noSuchMethod( + Invocation.getter(#onCallSelectAnswer), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallSelectAnswer), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallSelectAnswer), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onCallReject => (super.noSuchMethod( + Invocation.getter(#onCallReject), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallReject), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallReject), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onCallNegotiate => + (super.noSuchMethod( + Invocation.getter(#onCallNegotiate), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallNegotiate), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onCallNegotiate), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onAssertedIdentityReceived => + (super.noSuchMethod( + Invocation.getter(#onAssertedIdentityReceived), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onAssertedIdentityReceived), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onAssertedIdentityReceived), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> + get onSDPStreamMetadataChangedReceived => (super.noSuchMethod( + Invocation.getter(#onSDPStreamMetadataChangedReceived), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onSDPStreamMetadataChangedReceived), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onSDPStreamMetadataChangedReceived), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i9.RoomKeyRequest> get onRoomKeyRequest => + (super.noSuchMethod( + Invocation.getter(#onRoomKeyRequest), + returnValue: _FakeCachedStreamController_3<_i9.RoomKeyRequest>( + this, + Invocation.getter(#onRoomKeyRequest), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i9.RoomKeyRequest>( + this, + Invocation.getter(#onRoomKeyRequest), + ), + ) as _i3.CachedStreamController<_i9.RoomKeyRequest>); + + @override + _i3.CachedStreamController<_i9.KeyVerification> + get onKeyVerificationRequest => (super.noSuchMethod( + Invocation.getter(#onKeyVerificationRequest), + returnValue: _FakeCachedStreamController_3<_i9.KeyVerification>( + this, + Invocation.getter(#onKeyVerificationRequest), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i9.KeyVerification>( + this, + Invocation.getter(#onKeyVerificationRequest), + ), + ) as _i3.CachedStreamController<_i9.KeyVerification>); + + @override + _i3.CachedStreamController<_i2.UiaRequest> get onUiaRequest => + (super.noSuchMethod( + Invocation.getter(#onUiaRequest), + returnValue: _FakeCachedStreamController_3<_i2.UiaRequest>( + this, + Invocation.getter(#onUiaRequest), + ), + returnValueForMissingStub: + _FakeCachedStreamController_3<_i2.UiaRequest>( + this, + Invocation.getter(#onUiaRequest), + ), + ) as _i3.CachedStreamController<_i2.UiaRequest>); + + @override + _i3.CachedStreamController<_i2.Event> get onGroupCallRequest => + (super.noSuchMethod( + Invocation.getter(#onGroupCallRequest), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onGroupCallRequest), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onGroupCallRequest), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onGroupMember => + (super.noSuchMethod( + Invocation.getter(#onGroupMember), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onGroupMember), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onGroupMember), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + _i3.CachedStreamController<_i2.Event> get onRoomState => (super.noSuchMethod( + Invocation.getter(#onRoomState), + returnValue: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onRoomState), + ), + returnValueForMissingStub: _FakeCachedStreamController_3<_i2.Event>( + this, + Invocation.getter(#onRoomState), + ), + ) as _i3.CachedStreamController<_i2.Event>); + + @override + int get syncErrorTimeoutSec => (super.noSuchMethod( + Invocation.getter(#syncErrorTimeoutSec), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + + @override + set syncErrorTimeoutSec(int? _syncErrorTimeoutSec) => super.noSuchMethod( + Invocation.setter( + #syncErrorTimeoutSec, + _syncErrorTimeoutSec, + ), + returnValueForMissingStub: null, + ); + + @override + set syncPresence(_i2.PresenceType? _syncPresence) => super.noSuchMethod( + Invocation.setter( + #syncPresence, + _syncPresence, + ), + returnValueForMissingStub: null, + ); + + @override + bool get pinUnreadRooms => (super.noSuchMethod( + Invocation.getter(#pinUnreadRooms), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + set pinUnreadRooms(bool? _pinUnreadRooms) => super.noSuchMethod( + Invocation.setter( + #pinUnreadRooms, + _pinUnreadRooms, + ), + returnValueForMissingStub: null, + ); + + @override + bool get pinInvitedRooms => (super.noSuchMethod( + Invocation.getter(#pinInvitedRooms), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + set pinInvitedRooms(bool? _pinInvitedRooms) => super.noSuchMethod( + Invocation.setter( + #pinInvitedRooms, + _pinInvitedRooms, + ), + returnValueForMissingStub: null, + ); + + @override + set userDeviceKeysLoading(_i5.Future? _userDeviceKeysLoading) => + super.noSuchMethod( + Invocation.setter( + #userDeviceKeysLoading, + _userDeviceKeysLoading, + ), + returnValueForMissingStub: null, + ); + + @override + set roomsLoading(_i5.Future? _roomsLoading) => super.noSuchMethod( + Invocation.setter( + #roomsLoading, + _roomsLoading, + ), + returnValueForMissingStub: null, + ); + + @override + _i2.LoginState get loginState => (super.noSuchMethod( + Invocation.getter(#loginState), + returnValue: _i2.LoginState.loggedIn, + returnValueForMissingStub: _i2.LoginState.loggedIn, + ) as _i2.LoginState); + + @override + List<_i2.Room> get rooms => (super.noSuchMethod( + Invocation.getter(#rooms), + returnValue: <_i2.Room>[], + returnValueForMissingStub: <_i2.Room>[], + ) as List<_i2.Room>); + + @override + List<_i2.ArchivedRoom> get archivedRooms => (super.noSuchMethod( + Invocation.getter(#archivedRooms), + returnValue: <_i2.ArchivedRoom>[], + returnValueForMissingStub: <_i2.ArchivedRoom>[], + ) as List<_i2.ArchivedRoom>); + + @override + bool get encryptionEnabled => (super.noSuchMethod( + Invocation.getter(#encryptionEnabled), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + bool get fileEncryptionEnabled => (super.noSuchMethod( + Invocation.getter(#fileEncryptionEnabled), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + String get identityKey => (super.noSuchMethod( + Invocation.getter(#identityKey), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#identityKey), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#identityKey), + ), + ) as String); + + @override + String get fingerprintKey => (super.noSuchMethod( + Invocation.getter(#fingerprintKey), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#fingerprintKey), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#fingerprintKey), + ), + ) as String); + + @override + bool get isUnknownSession => (super.noSuchMethod( + Invocation.getter(#isUnknownSession), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + set rooms(List<_i2.Room>? newList) => super.noSuchMethod( + Invocation.setter( + #rooms, + newList, + ), + returnValueForMissingStub: null, + ); + + @override + Map get accountData => (super.noSuchMethod( + Invocation.getter(#accountData), + returnValue: {}, + returnValueForMissingStub: {}, + ) as Map); + + @override + _i2.PushruleEvaluator get pushruleEvaluator => (super.noSuchMethod( + Invocation.getter(#pushruleEvaluator), + returnValue: _FakePushruleEvaluator_4( + this, + Invocation.getter(#pushruleEvaluator), + ), + returnValueForMissingStub: _FakePushruleEvaluator_4( + this, + Invocation.getter(#pushruleEvaluator), + ), + ) as _i2.PushruleEvaluator); + + @override + Map get directChats => (super.noSuchMethod( + Invocation.getter(#directChats), + returnValue: {}, + returnValueForMissingStub: {}, + ) as Map); + + @override + _i5.Future<_i2.Profile> get ownProfile => (super.noSuchMethod( + Invocation.getter(#ownProfile), + returnValue: _i5.Future<_i2.Profile>.value(_FakeProfile_5( + this, + Invocation.getter(#ownProfile), + )), + returnValueForMissingStub: _i5.Future<_i2.Profile>.value(_FakeProfile_5( + this, + Invocation.getter(#ownProfile), + )), + ) as _i5.Future<_i2.Profile>); + + @override + _i5.Future> get archive => (super.noSuchMethod( + Invocation.getter(#archive), + returnValue: _i5.Future>.value(<_i2.Room>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i2.Room>[]), + ) as _i5.Future>); + + @override + bool get syncPending => (super.noSuchMethod( + Invocation.getter(#syncPending), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + set backgroundSync(bool? enabled) => super.noSuchMethod( + Invocation.setter( + #backgroundSync, + enabled, + ), + returnValueForMissingStub: null, + ); + + @override + _i2.RoomSorter get sortRoomsBy => (super.noSuchMethod( + Invocation.getter(#sortRoomsBy), + returnValue: ( + _i2.Room a, + _i2.Room b, + ) => + 0, + returnValueForMissingStub: ( + _i2.Room a, + _i2.Room b, + ) => + 0, + ) as _i2.RoomSorter); + + @override + Map get userDeviceKeys => (super.noSuchMethod( + Invocation.getter(#userDeviceKeys), + returnValue: {}, + returnValueForMissingStub: {}, + ) as Map); + + @override + List<_i2.DeviceKeys> get unverifiedDevices => (super.noSuchMethod( + Invocation.getter(#unverifiedDevices), + returnValue: <_i2.DeviceKeys>[], + returnValueForMissingStub: <_i2.DeviceKeys>[], + ) as List<_i2.DeviceKeys>); + + @override + bool get allPushNotificationsMuted => (super.noSuchMethod( + Invocation.getter(#allPushNotificationsMuted), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + List get ignoredUsers => (super.noSuchMethod( + Invocation.getter(#ignoredUsers), + returnValue: [], + returnValueForMissingStub: [], + ) as List); + + @override + set isSupportDeleteCollections(bool? supportDeleteCollections) => + super.noSuchMethod( + Invocation.setter( + #isSupportDeleteCollections, + supportDeleteCollections, + ), + returnValueForMissingStub: null, + ); + + @override + set homeserver(Uri? uri) => super.noSuchMethod( + Invocation.setter( + #homeserver, + uri, + ), + returnValueForMissingStub: null, + ); + + @override + set accessToken(String? token) => super.noSuchMethod( + Invocation.setter( + #accessToken, + token, + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Client get httpClient => (super.noSuchMethod( + Invocation.getter(#httpClient), + returnValue: _FakeClient_6( + this, + Invocation.getter(#httpClient), + ), + returnValueForMissingStub: _FakeClient_6( + this, + Invocation.getter(#httpClient), + ), + ) as _i4.Client); + + @override + set httpClient(_i4.Client? _httpClient) => super.noSuchMethod( + Invocation.setter( + #httpClient, + _httpClient, + ), + returnValueForMissingStub: null, + ); + + @override + set baseUri(Uri? _baseUri) => super.noSuchMethod( + Invocation.setter( + #baseUri, + _baseUri, + ), + returnValueForMissingStub: null, + ); + + @override + set bearerToken(String? _bearerToken) => super.noSuchMethod( + Invocation.setter( + #bearerToken, + _bearerToken, + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future runInBackground( + _i5.FutureOr Function(U)? function, + U? arg, + ) => + (super.noSuchMethod( + Invocation.method( + #runInBackground, + [ + function, + arg, + ], + ), + returnValue: _i10.ifNotNull( + _i10.dummyValueOrNull( + this, + Invocation.method( + #runInBackground, + [ + function, + arg, + ], + ), + ), + (T v) => _i5.Future.value(v), + ) ?? + _FakeFuture_7( + this, + Invocation.method( + #runInBackground, + [ + function, + arg, + ], + ), + ), + returnValueForMissingStub: _i10.ifNotNull( + _i10.dummyValueOrNull( + this, + Invocation.method( + #runInBackground, + [ + function, + arg, + ], + ), + ), + (T v) => _i5.Future.value(v), + ) ?? + _FakeFuture_7( + this, + Invocation.method( + #runInBackground, + [ + function, + arg, + ], + ), + ), + ) as _i5.Future); + + @override + bool isLogged() => (super.noSuchMethod( + Invocation.method( + #isLogged, + [], + ), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + String generateUniqueTransactionId() => (super.noSuchMethod( + Invocation.method( + #generateUniqueTransactionId, + [], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #generateUniqueTransactionId, + [], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #generateUniqueTransactionId, + [], + ), + ), + ) as String); + + @override + _i2.Room? getRoomByAlias(String? alias) => (super.noSuchMethod( + Invocation.method( + #getRoomByAlias, + [alias], + ), + returnValueForMissingStub: null, + ) as _i2.Room?); + + @override + _i2.Room? getRoomById(String? id) => (super.noSuchMethod( + Invocation.method( + #getRoomById, + [id], + ), + returnValueForMissingStub: null, + ) as _i2.Room?); + + @override + String? getDirectChatFromUserId(String? userId) => (super.noSuchMethod( + Invocation.method( + #getDirectChatFromUserId, + [userId], + ), + returnValueForMissingStub: null, + ) as String?); + + @override + _i5.Future<_i2.DiscoveryInformation> getDiscoveryInformationsByUserId( + String? MatrixIdOrDomain) => + (super.noSuchMethod( + Invocation.method( + #getDiscoveryInformationsByUserId, + [MatrixIdOrDomain], + ), + returnValue: _i5.Future<_i2.DiscoveryInformation>.value( + _FakeDiscoveryInformation_8( + this, + Invocation.method( + #getDiscoveryInformationsByUserId, + [MatrixIdOrDomain], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.DiscoveryInformation>.value( + _FakeDiscoveryInformation_8( + this, + Invocation.method( + #getDiscoveryInformationsByUserId, + [MatrixIdOrDomain], + ), + )), + ) as _i5.Future<_i2.DiscoveryInformation>); + + @override + _i5.Future<_i2.HomeserverSummary> checkHomeserver( + Uri? homeserverUrl, { + bool? checkWellKnown = true, + Set? overrideSupportedVersions, + }) => + (super.noSuchMethod( + Invocation.method( + #checkHomeserver, + [homeserverUrl], + { + #checkWellKnown: checkWellKnown, + #overrideSupportedVersions: overrideSupportedVersions, + }, + ), + returnValue: + _i5.Future<_i2.HomeserverSummary>.value(_FakeHomeserverSummary_9( + this, + Invocation.method( + #checkHomeserver, + [homeserverUrl], + { + #checkWellKnown: checkWellKnown, + #overrideSupportedVersions: overrideSupportedVersions, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.HomeserverSummary>.value(_FakeHomeserverSummary_9( + this, + Invocation.method( + #checkHomeserver, + [homeserverUrl], + { + #checkWellKnown: checkWellKnown, + #overrideSupportedVersions: overrideSupportedVersions, + }, + ), + )), + ) as _i5.Future<_i2.HomeserverSummary>); + + @override + _i5.Future<_i2.RegisterResponse> register({ + String? username, + String? password, + String? deviceId, + String? initialDeviceDisplayName, + bool? inhibitLogin, + bool? refreshToken, + _i2.AuthenticationData? auth, + _i2.AccountKind? kind, + }) => + (super.noSuchMethod( + Invocation.method( + #register, + [], + { + #username: username, + #password: password, + #deviceId: deviceId, + #initialDeviceDisplayName: initialDeviceDisplayName, + #inhibitLogin: inhibitLogin, + #refreshToken: refreshToken, + #auth: auth, + #kind: kind, + }, + ), + returnValue: + _i5.Future<_i2.RegisterResponse>.value(_FakeRegisterResponse_10( + this, + Invocation.method( + #register, + [], + { + #username: username, + #password: password, + #deviceId: deviceId, + #initialDeviceDisplayName: initialDeviceDisplayName, + #inhibitLogin: inhibitLogin, + #refreshToken: refreshToken, + #auth: auth, + #kind: kind, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.RegisterResponse>.value(_FakeRegisterResponse_10( + this, + Invocation.method( + #register, + [], + { + #username: username, + #password: password, + #deviceId: deviceId, + #initialDeviceDisplayName: initialDeviceDisplayName, + #inhibitLogin: inhibitLogin, + #refreshToken: refreshToken, + #auth: auth, + #kind: kind, + }, + ), + )), + ) as _i5.Future<_i2.RegisterResponse>); + + @override + _i5.Future<_i2.LoginResponse> login( + _i2.LoginType? type, { + _i2.AuthenticationIdentifier? identifier, + String? password, + String? token, + String? deviceId, + String? initialDeviceDisplayName, + bool? refreshToken, + String? user, + String? medium, + String? address, + }) => + (super.noSuchMethod( + Invocation.method( + #login, + [type], + { + #identifier: identifier, + #password: password, + #token: token, + #deviceId: deviceId, + #initialDeviceDisplayName: initialDeviceDisplayName, + #refreshToken: refreshToken, + #user: user, + #medium: medium, + #address: address, + }, + ), + returnValue: _i5.Future<_i2.LoginResponse>.value(_FakeLoginResponse_11( + this, + Invocation.method( + #login, + [type], + { + #identifier: identifier, + #password: password, + #token: token, + #deviceId: deviceId, + #initialDeviceDisplayName: initialDeviceDisplayName, + #refreshToken: refreshToken, + #user: user, + #medium: medium, + #address: address, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.LoginResponse>.value(_FakeLoginResponse_11( + this, + Invocation.method( + #login, + [type], + { + #identifier: identifier, + #password: password, + #token: token, + #deviceId: deviceId, + #initialDeviceDisplayName: initialDeviceDisplayName, + #refreshToken: refreshToken, + #user: user, + #medium: medium, + #address: address, + }, + ), + )), + ) as _i5.Future<_i2.LoginResponse>); + + @override + _i5.Future logout() => (super.noSuchMethod( + Invocation.method( + #logout, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future logoutAll() => (super.noSuchMethod( + Invocation.method( + #logoutAll, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future uiaRequestBackground( + _i5.Future Function(_i2.AuthenticationData?)? request) => + (super.noSuchMethod( + Invocation.method( + #uiaRequestBackground, + [request], + ), + returnValue: _i10.ifNotNull( + _i10.dummyValueOrNull( + this, + Invocation.method( + #uiaRequestBackground, + [request], + ), + ), + (T v) => _i5.Future.value(v), + ) ?? + _FakeFuture_7( + this, + Invocation.method( + #uiaRequestBackground, + [request], + ), + ), + returnValueForMissingStub: _i10.ifNotNull( + _i10.dummyValueOrNull( + this, + Invocation.method( + #uiaRequestBackground, + [request], + ), + ), + (T v) => _i5.Future.value(v), + ) ?? + _FakeFuture_7( + this, + Invocation.method( + #uiaRequestBackground, + [request], + ), + ), + ) as _i5.Future); + + @override + _i5.Future startDirectChat( + String? mxid, { + bool? enableEncryption, + List<_i2.StateEvent>? initialState, + bool? waitForSync = true, + Map? powerLevelContentOverride, + _i2.CreateRoomPreset? preset = _i2.CreateRoomPreset.trustedPrivateChat, + }) => + (super.noSuchMethod( + Invocation.method( + #startDirectChat, + [mxid], + { + #enableEncryption: enableEncryption, + #initialState: initialState, + #waitForSync: waitForSync, + #powerLevelContentOverride: powerLevelContentOverride, + #preset: preset, + }, + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #startDirectChat, + [mxid], + { + #enableEncryption: enableEncryption, + #initialState: initialState, + #waitForSync: waitForSync, + #powerLevelContentOverride: powerLevelContentOverride, + #preset: preset, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #startDirectChat, + [mxid], + { + #enableEncryption: enableEncryption, + #initialState: initialState, + #waitForSync: waitForSync, + #powerLevelContentOverride: powerLevelContentOverride, + #preset: preset, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future createGroupChat({ + String? groupName, + bool? enableEncryption, + List? invite, + _i2.CreateRoomPreset? preset = _i2.CreateRoomPreset.privateChat, + List<_i2.StateEvent>? initialState, + _i2.Visibility? visibility, + bool? waitForSync = true, + bool? groupCall = false, + Map? powerLevelContentOverride, + }) => + (super.noSuchMethod( + Invocation.method( + #createGroupChat, + [], + { + #groupName: groupName, + #enableEncryption: enableEncryption, + #invite: invite, + #preset: preset, + #initialState: initialState, + #visibility: visibility, + #waitForSync: waitForSync, + #groupCall: groupCall, + #powerLevelContentOverride: powerLevelContentOverride, + }, + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #createGroupChat, + [], + { + #groupName: groupName, + #enableEncryption: enableEncryption, + #invite: invite, + #preset: preset, + #initialState: initialState, + #visibility: visibility, + #waitForSync: waitForSync, + #groupCall: groupCall, + #powerLevelContentOverride: powerLevelContentOverride, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #createGroupChat, + [], + { + #groupName: groupName, + #enableEncryption: enableEncryption, + #invite: invite, + #preset: preset, + #initialState: initialState, + #visibility: visibility, + #waitForSync: waitForSync, + #groupCall: groupCall, + #powerLevelContentOverride: powerLevelContentOverride, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future<_i2.SyncUpdate> waitForRoomInSync( + String? roomId, { + bool? join = false, + bool? invite = false, + bool? leave = false, + }) => + (super.noSuchMethod( + Invocation.method( + #waitForRoomInSync, + [roomId], + { + #join: join, + #invite: invite, + #leave: leave, + }, + ), + returnValue: _i5.Future<_i2.SyncUpdate>.value(_FakeSyncUpdate_12( + this, + Invocation.method( + #waitForRoomInSync, + [roomId], + { + #join: join, + #invite: invite, + #leave: leave, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.SyncUpdate>.value(_FakeSyncUpdate_12( + this, + Invocation.method( + #waitForRoomInSync, + [roomId], + { + #join: join, + #invite: invite, + #leave: leave, + }, + ), + )), + ) as _i5.Future<_i2.SyncUpdate>); + + @override + _i5.Future userOwnsEncryptionKeys(String? userId) => + (super.noSuchMethod( + Invocation.method( + #userOwnsEncryptionKeys, + [userId], + ), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future createSpace({ + String? name, + String? topic, + _i2.Visibility? visibility = _i2.Visibility.public, + String? spaceAliasName, + List? invite, + List<_i2.Invite3pid>? invite3pid, + String? roomVersion, + bool? waitForSync = false, + }) => + (super.noSuchMethod( + Invocation.method( + #createSpace, + [], + { + #name: name, + #topic: topic, + #visibility: visibility, + #spaceAliasName: spaceAliasName, + #invite: invite, + #invite3pid: invite3pid, + #roomVersion: roomVersion, + #waitForSync: waitForSync, + }, + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #createSpace, + [], + { + #name: name, + #topic: topic, + #visibility: visibility, + #spaceAliasName: spaceAliasName, + #invite: invite, + #invite3pid: invite3pid, + #roomVersion: roomVersion, + #waitForSync: waitForSync, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #createSpace, + [], + { + #name: name, + #topic: topic, + #visibility: visibility, + #spaceAliasName: spaceAliasName, + #invite: invite, + #invite3pid: invite3pid, + #roomVersion: roomVersion, + #waitForSync: waitForSync, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future<_i2.Profile> fetchOwnProfileFromServer( + {bool? useServerCache = false}) => + (super.noSuchMethod( + Invocation.method( + #fetchOwnProfileFromServer, + [], + {#useServerCache: useServerCache}, + ), + returnValue: _i5.Future<_i2.Profile>.value(_FakeProfile_5( + this, + Invocation.method( + #fetchOwnProfileFromServer, + [], + {#useServerCache: useServerCache}, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.Profile>.value(_FakeProfile_5( + this, + Invocation.method( + #fetchOwnProfileFromServer, + [], + {#useServerCache: useServerCache}, + ), + )), + ) as _i5.Future<_i2.Profile>); + + @override + _i5.Future<_i2.Profile> fetchOwnProfile({ + bool? getFromRooms = true, + bool? cache = true, + }) => + (super.noSuchMethod( + Invocation.method( + #fetchOwnProfile, + [], + { + #getFromRooms: getFromRooms, + #cache: cache, + }, + ), + returnValue: _i5.Future<_i2.Profile>.value(_FakeProfile_5( + this, + Invocation.method( + #fetchOwnProfile, + [], + { + #getFromRooms: getFromRooms, + #cache: cache, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.Profile>.value(_FakeProfile_5( + this, + Invocation.method( + #fetchOwnProfile, + [], + { + #getFromRooms: getFromRooms, + #cache: cache, + }, + ), + )), + ) as _i5.Future<_i2.Profile>); + + @override + _i5.Future<_i2.Profile> getProfileFromUserId( + String? userId, { + bool? cache = true, + bool? getFromRooms = true, + }) => + (super.noSuchMethod( + Invocation.method( + #getProfileFromUserId, + [userId], + { + #cache: cache, + #getFromRooms: getFromRooms, + }, + ), + returnValue: _i5.Future<_i2.Profile>.value(_FakeProfile_5( + this, + Invocation.method( + #getProfileFromUserId, + [userId], + { + #cache: cache, + #getFromRooms: getFromRooms, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.Profile>.value(_FakeProfile_5( + this, + Invocation.method( + #getProfileFromUserId, + [userId], + { + #cache: cache, + #getFromRooms: getFromRooms, + }, + ), + )), + ) as _i5.Future<_i2.Profile>); + + @override + _i2.ArchivedRoom? getArchiveRoomFromCache(String? roomId) => + (super.noSuchMethod( + Invocation.method( + #getArchiveRoomFromCache, + [roomId], + ), + returnValueForMissingStub: null, + ) as _i2.ArchivedRoom?); + + @override + void clearArchivesFromCache() => super.noSuchMethod( + Invocation.method( + #clearArchivesFromCache, + [], + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future> loadArchive() => (super.noSuchMethod( + Invocation.method( + #loadArchive, + [], + ), + returnValue: _i5.Future>.value(<_i2.Room>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i2.Room>[]), + ) as _i5.Future>); + + @override + _i5.Future> loadArchiveWithTimeline() => + (super.noSuchMethod( + Invocation.method( + #loadArchiveWithTimeline, + [], + ), + returnValue: + _i5.Future>.value(<_i2.ArchivedRoom>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i2.ArchivedRoom>[]), + ) as _i5.Future>); + + @override + _i5.Future uploadContent( + _i11.Uint8List? file, { + String? filename, + String? contentType, + }) => + (super.noSuchMethod( + Invocation.method( + #uploadContent, + [file], + { + #filename: filename, + #contentType: contentType, + }, + ), + returnValue: _i5.Future.value(_FakeUri_13( + this, + Invocation.method( + #uploadContent, + [file], + { + #filename: filename, + #contentType: contentType, + }, + ), + )), + returnValueForMissingStub: _i5.Future.value(_FakeUri_13( + this, + Invocation.method( + #uploadContent, + [file], + { + #filename: filename, + #contentType: contentType, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future setTyping( + String? userId, + String? roomId, + bool? typing, { + int? timeout, + }) => + (super.noSuchMethod( + Invocation.method( + #setTyping, + [ + userId, + roomId, + typing, + ], + {#timeout: timeout}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future exportDump() => (super.noSuchMethod( + Invocation.method( + #exportDump, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future importDump(String? export) => (super.noSuchMethod( + Invocation.method( + #importDump, + [export], + ), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future setAvatar(_i2.MatrixFile? file) => (super.noSuchMethod( + Invocation.method( + #setAvatar, + [file], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.Event?> getEventByPushNotification( + _i2.PushNotification? notification, { + bool? storeInDatabase = true, + Duration? timeoutForServerRequests = const Duration(seconds: 8), + bool? returnNullIfSeen = true, + }) => + (super.noSuchMethod( + Invocation.method( + #getEventByPushNotification, + [notification], + { + #storeInDatabase: storeInDatabase, + #timeoutForServerRequests: timeoutForServerRequests, + #returnNullIfSeen: returnNullIfSeen, + }, + ), + returnValue: _i5.Future<_i2.Event?>.value(), + returnValueForMissingStub: _i5.Future<_i2.Event?>.value(), + ) as _i5.Future<_i2.Event?>); + + @override + _i5.Future init({ + String? newToken, + Uri? newHomeserver, + String? newUserID, + String? newDeviceName, + String? newDeviceID, + String? newOlmAccount, + bool? waitForFirstSync = true, + bool? waitUntilLoadCompletedLoaded = true, + void Function()? onMigration, + }) => + (super.noSuchMethod( + Invocation.method( + #init, + [], + { + #newToken: newToken, + #newHomeserver: newHomeserver, + #newUserID: newUserID, + #newDeviceName: newDeviceName, + #newDeviceID: newDeviceID, + #newOlmAccount: newOlmAccount, + #waitForFirstSync: waitForFirstSync, + #waitUntilLoadCompletedLoaded: waitUntilLoadCompletedLoaded, + #onMigration: onMigration, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + void setUserId(String? s) => super.noSuchMethod( + Invocation.method( + #setUserId, + [s], + ), + returnValueForMissingStub: null, + ); + + @override + _i5.Future clear() => (super.noSuchMethod( + Invocation.method( + #clear, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future oneShotSync() => (super.noSuchMethod( + Invocation.method( + #oneShotSync, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future handleSync( + _i2.SyncUpdate? sync, { + _i2.Direction? direction, + }) => + (super.noSuchMethod( + Invocation.method( + #handleSync, + [sync], + {#direction: direction}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i2.DeviceKeys? getUserDeviceKeysByCurve25519Key(String? senderKey) => + (super.noSuchMethod( + Invocation.method( + #getUserDeviceKeysByCurve25519Key, + [senderKey], + ), + returnValueForMissingStub: null, + ) as _i2.DeviceKeys?); + + @override + _i5.Future updateUserDeviceKeys({Set? additionalUsers}) => + (super.noSuchMethod( + Invocation.method( + #updateUserDeviceKeys, + [], + {#additionalUsers: additionalUsers}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future processToDeviceQueue() => (super.noSuchMethod( + Invocation.method( + #processToDeviceQueue, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future sendToDevice( + String? eventType, + String? txnId, + Map>>? messages, + ) => + (super.noSuchMethod( + Invocation.method( + #sendToDevice, + [ + eventType, + txnId, + messages, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future sendToDevicesOfUserIds( + Set? users, + String? eventType, + Map? message, { + String? messageId, + }) => + (super.noSuchMethod( + Invocation.method( + #sendToDevicesOfUserIds, + [ + users, + eventType, + message, + ], + {#messageId: messageId}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future sendToDeviceEncrypted( + List<_i2.DeviceKeys>? deviceKeys, + String? eventType, + Map? message, { + String? messageId, + bool? onlyVerified = false, + }) => + (super.noSuchMethod( + Invocation.method( + #sendToDeviceEncrypted, + [ + deviceKeys, + eventType, + message, + ], + { + #messageId: messageId, + #onlyVerified: onlyVerified, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future sendToDeviceEncryptedChunked( + List<_i2.DeviceKeys>? deviceKeys, + String? eventType, + Map? message, + ) => + (super.noSuchMethod( + Invocation.method( + #sendToDeviceEncryptedChunked, + [ + deviceKeys, + eventType, + message, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setMuteAllPushNotifications(bool? muted) => + (super.noSuchMethod( + Invocation.method( + #setMuteAllPushNotifications, + [muted], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future changePassword( + String? newPassword, { + String? oldPassword, + _i2.AuthenticationData? auth, + bool? logoutDevices, + }) => + (super.noSuchMethod( + Invocation.method( + #changePassword, + [newPassword], + { + #oldPassword: oldPassword, + #auth: auth, + #logoutDevices: logoutDevices, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future clearCache() => (super.noSuchMethod( + Invocation.method( + #clearCache, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future ignoreUser(String? userId) => (super.noSuchMethod( + Invocation.method( + #ignoreUser, + [userId], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future unignoreUser(String? userId) => (super.noSuchMethod( + Invocation.method( + #unignoreUser, + [userId], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future abortSync() => (super.noSuchMethod( + Invocation.method( + #abortSync, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future dispose({bool? closeDatabase = true}) => (super.noSuchMethod( + Invocation.method( + #dispose, + [], + {#closeDatabase: closeDatabase}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + Never unexpectedResponse( + _i4.BaseResponse? response, + _i11.Uint8List? body, + ) => + (super.noSuchMethod( + Invocation.method( + #unexpectedResponse, + [ + response, + body, + ], + ), + returnValue: null, + returnValueForMissingStub: null, + ) as Never); + + @override + _i5.Future> request( + _i2.RequestType? type, + String? action, { + dynamic data = r'', + String? contentType = r'application/json', + Map? query, + }) => + (super.noSuchMethod( + Invocation.method( + #request, + [ + type, + action, + ], + { + #data: data, + #contentType: contentType, + #query: query, + }, + ), + returnValue: + _i5.Future>.value({}), + returnValueForMissingStub: + _i5.Future>.value({}), + ) as _i5.Future>); + + @override + _i5.Future> uploadKeys({ + _i2.MatrixDeviceKeys? deviceKeys, + Map? oneTimeKeys, + Map? fallbackKeys, + }) => + (super.noSuchMethod( + Invocation.method( + #uploadKeys, + [], + { + #deviceKeys: deviceKeys, + #oneTimeKeys: oneTimeKeys, + #fallbackKeys: fallbackKeys, + }, + ), + returnValue: _i5.Future>.value({}), + returnValueForMissingStub: + _i5.Future>.value({}), + ) as _i5.Future>); + + @override + _i5.Future postPusher( + _i2.Pusher? pusher, { + bool? append, + }) => + (super.noSuchMethod( + Invocation.method( + #postPusher, + [pusher], + {#append: append}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future deletePusher(_i2.PusherId? pusher) => (super.noSuchMethod( + Invocation.method( + #deletePusher, + [pusher], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.TurnServerCredentials> getTurnServer() => (super.noSuchMethod( + Invocation.method( + #getTurnServer, + [], + ), + returnValue: _i5.Future<_i2.TurnServerCredentials>.value( + _FakeTurnServerCredentials_14( + this, + Invocation.method( + #getTurnServer, + [], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.TurnServerCredentials>.value( + _FakeTurnServerCredentials_14( + this, + Invocation.method( + #getTurnServer, + [], + ), + )), + ) as _i5.Future<_i2.TurnServerCredentials>); + + @override + _i5.Future<_i2.RoomKeysUpdateResponse> deleteRoomKeysBySessionId( + String? roomId, + String? sessionId, + String? version, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + returnValue: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #deleteRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #deleteRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + )), + ) as _i5.Future<_i2.RoomKeysUpdateResponse>); + + @override + _i5.Future<_i2.RoomKeysUpdateResponse> putRoomKeysBySessionId( + String? roomId, + String? sessionId, + String? version, + _i2.KeyBackupData? data, + ) => + (super.noSuchMethod( + Invocation.method( + #putRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + data, + ], + ), + returnValue: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #putRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + data, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #putRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + data, + ], + ), + )), + ) as _i5.Future<_i2.RoomKeysUpdateResponse>); + + @override + _i5.Future<_i2.KeyBackupData> getRoomKeysBySessionId( + String? roomId, + String? sessionId, + String? version, + ) => + (super.noSuchMethod( + Invocation.method( + #getRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + returnValue: _i5.Future<_i2.KeyBackupData>.value(_FakeKeyBackupData_16( + this, + Invocation.method( + #getRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.KeyBackupData>.value(_FakeKeyBackupData_16( + this, + Invocation.method( + #getRoomKeysBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + )), + ) as _i5.Future<_i2.KeyBackupData>); + + @override + _i5.Future<_i2.DiscoveryInformation> getWellknown() => (super.noSuchMethod( + Invocation.method( + #getWellknown, + [], + ), + returnValue: _i5.Future<_i2.DiscoveryInformation>.value( + _FakeDiscoveryInformation_8( + this, + Invocation.method( + #getWellknown, + [], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.DiscoveryInformation>.value( + _FakeDiscoveryInformation_8( + this, + Invocation.method( + #getWellknown, + [], + ), + )), + ) as _i5.Future<_i2.DiscoveryInformation>); + + @override + _i5.Future registrationTokenValidity(String? token) => + (super.noSuchMethod( + Invocation.method( + #registrationTokenValidity, + [token], + ), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future<_i2.GetSpaceHierarchyResponse> getSpaceHierarchy( + String? roomId, { + bool? suggestedOnly, + int? limit, + int? maxDepth, + String? from, + }) => + (super.noSuchMethod( + Invocation.method( + #getSpaceHierarchy, + [roomId], + { + #suggestedOnly: suggestedOnly, + #limit: limit, + #maxDepth: maxDepth, + #from: from, + }, + ), + returnValue: _i5.Future<_i2.GetSpaceHierarchyResponse>.value( + _FakeGetSpaceHierarchyResponse_17( + this, + Invocation.method( + #getSpaceHierarchy, + [roomId], + { + #suggestedOnly: suggestedOnly, + #limit: limit, + #maxDepth: maxDepth, + #from: from, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetSpaceHierarchyResponse>.value( + _FakeGetSpaceHierarchyResponse_17( + this, + Invocation.method( + #getSpaceHierarchy, + [roomId], + { + #suggestedOnly: suggestedOnly, + #limit: limit, + #maxDepth: maxDepth, + #from: from, + }, + ), + )), + ) as _i5.Future<_i2.GetSpaceHierarchyResponse>); + + @override + _i5.Future<_i2.GetRelatingEventsResponse> getRelatingEvents( + String? roomId, + String? eventId, { + String? from, + String? to, + int? limit, + _i2.Direction? dir, + }) => + (super.noSuchMethod( + Invocation.method( + #getRelatingEvents, + [ + roomId, + eventId, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + returnValue: _i5.Future<_i2.GetRelatingEventsResponse>.value( + _FakeGetRelatingEventsResponse_18( + this, + Invocation.method( + #getRelatingEvents, + [ + roomId, + eventId, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetRelatingEventsResponse>.value( + _FakeGetRelatingEventsResponse_18( + this, + Invocation.method( + #getRelatingEvents, + [ + roomId, + eventId, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + )), + ) as _i5.Future<_i2.GetRelatingEventsResponse>); + + @override + _i5.Future<_i2.GetRelatingEventsWithRelTypeResponse> + getRelatingEventsWithRelType( + String? roomId, + String? eventId, + String? relType, { + String? from, + String? to, + int? limit, + _i2.Direction? dir, + }) => + (super.noSuchMethod( + Invocation.method( + #getRelatingEventsWithRelType, + [ + roomId, + eventId, + relType, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + returnValue: + _i5.Future<_i2.GetRelatingEventsWithRelTypeResponse>.value( + _FakeGetRelatingEventsWithRelTypeResponse_19( + this, + Invocation.method( + #getRelatingEventsWithRelType, + [ + roomId, + eventId, + relType, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetRelatingEventsWithRelTypeResponse>.value( + _FakeGetRelatingEventsWithRelTypeResponse_19( + this, + Invocation.method( + #getRelatingEventsWithRelType, + [ + roomId, + eventId, + relType, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + )), + ) as _i5.Future<_i2.GetRelatingEventsWithRelTypeResponse>); + + @override + _i5.Future<_i2.GetRelatingEventsWithRelTypeAndEventTypeResponse> + getRelatingEventsWithRelTypeAndEventType( + String? roomId, + String? eventId, + String? relType, + String? eventType, { + String? from, + String? to, + int? limit, + _i2.Direction? dir, + }) => + (super.noSuchMethod( + Invocation.method( + #getRelatingEventsWithRelTypeAndEventType, + [ + roomId, + eventId, + relType, + eventType, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + returnValue: _i5.Future< + _i2.GetRelatingEventsWithRelTypeAndEventTypeResponse>.value( + _FakeGetRelatingEventsWithRelTypeAndEventTypeResponse_20( + this, + Invocation.method( + #getRelatingEventsWithRelTypeAndEventType, + [ + roomId, + eventId, + relType, + eventType, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + )), + returnValueForMissingStub: _i5.Future< + _i2.GetRelatingEventsWithRelTypeAndEventTypeResponse>.value( + _FakeGetRelatingEventsWithRelTypeAndEventTypeResponse_20( + this, + Invocation.method( + #getRelatingEventsWithRelTypeAndEventType, + [ + roomId, + eventId, + relType, + eventType, + ], + { + #from: from, + #to: to, + #limit: limit, + #dir: dir, + }, + ), + )), + ) as _i5 + .Future<_i2.GetRelatingEventsWithRelTypeAndEventTypeResponse>); + + @override + _i5.Future<_i2.GetThreadRootsResponse> getThreadRoots( + String? roomId, { + _i2.Include? include, + int? limit, + String? from, + }) => + (super.noSuchMethod( + Invocation.method( + #getThreadRoots, + [roomId], + { + #include: include, + #limit: limit, + #from: from, + }, + ), + returnValue: _i5.Future<_i2.GetThreadRootsResponse>.value( + _FakeGetThreadRootsResponse_21( + this, + Invocation.method( + #getThreadRoots, + [roomId], + { + #include: include, + #limit: limit, + #from: from, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.GetThreadRootsResponse>.value( + _FakeGetThreadRootsResponse_21( + this, + Invocation.method( + #getThreadRoots, + [roomId], + { + #include: include, + #limit: limit, + #from: from, + }, + ), + )), + ) as _i5.Future<_i2.GetThreadRootsResponse>); + + @override + _i5.Future<_i2.GetEventByTimestampResponse> getEventByTimestamp( + String? roomId, + int? ts, + _i2.Direction? dir, + ) => + (super.noSuchMethod( + Invocation.method( + #getEventByTimestamp, + [ + roomId, + ts, + dir, + ], + ), + returnValue: _i5.Future<_i2.GetEventByTimestampResponse>.value( + _FakeGetEventByTimestampResponse_22( + this, + Invocation.method( + #getEventByTimestamp, + [ + roomId, + ts, + dir, + ], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetEventByTimestampResponse>.value( + _FakeGetEventByTimestampResponse_22( + this, + Invocation.method( + #getEventByTimestamp, + [ + roomId, + ts, + dir, + ], + ), + )), + ) as _i5.Future<_i2.GetEventByTimestampResponse>); + + @override + _i5.Future?> getAccount3PIDs() => + (super.noSuchMethod( + Invocation.method( + #getAccount3PIDs, + [], + ), + returnValue: _i5.Future?>.value(), + returnValueForMissingStub: + _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future post3PIDs(_i2.ThreePidCredentials? threePidCreds) => + (super.noSuchMethod( + Invocation.method( + #post3PIDs, + [threePidCreds], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future add3PID( + String? clientSecret, + String? sid, { + _i2.AuthenticationData? auth, + }) => + (super.noSuchMethod( + Invocation.method( + #add3PID, + [ + clientSecret, + sid, + ], + {#auth: auth}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future bind3PID( + String? clientSecret, + String? idAccessToken, + String? idServer, + String? sid, + ) => + (super.noSuchMethod( + Invocation.method( + #bind3PID, + [ + clientSecret, + idAccessToken, + idServer, + sid, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.IdServerUnbindResult> delete3pidFromAccount( + String? address, + _i2.ThirdPartyIdentifierMedium? medium, { + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #delete3pidFromAccount, + [ + address, + medium, + ], + {#idServer: idServer}, + ), + returnValue: _i5.Future<_i2.IdServerUnbindResult>.value( + _i2.IdServerUnbindResult.noSupport), + returnValueForMissingStub: _i5.Future<_i2.IdServerUnbindResult>.value( + _i2.IdServerUnbindResult.noSupport), + ) as _i5.Future<_i2.IdServerUnbindResult>); + + @override + _i5.Future<_i2.RequestTokenResponse> requestTokenTo3PIDEmail( + String? clientSecret, + String? email, + int? sendAttempt, { + String? nextLink, + String? idAccessToken, + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #requestTokenTo3PIDEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + returnValue: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenTo3PIDEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenTo3PIDEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + ) as _i5.Future<_i2.RequestTokenResponse>); + + @override + _i5.Future<_i2.RequestTokenResponse> requestTokenTo3PIDMSISDN( + String? clientSecret, + String? country, + String? phoneNumber, + int? sendAttempt, { + String? nextLink, + String? idAccessToken, + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #requestTokenTo3PIDMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + returnValue: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenTo3PIDMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenTo3PIDMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + ) as _i5.Future<_i2.RequestTokenResponse>); + + @override + _i5.Future<_i2.IdServerUnbindResult> unbind3pidFromAccount( + String? address, + _i2.ThirdPartyIdentifierMedium? medium, { + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #unbind3pidFromAccount, + [ + address, + medium, + ], + {#idServer: idServer}, + ), + returnValue: _i5.Future<_i2.IdServerUnbindResult>.value( + _i2.IdServerUnbindResult.noSupport), + returnValueForMissingStub: _i5.Future<_i2.IdServerUnbindResult>.value( + _i2.IdServerUnbindResult.noSupport), + ) as _i5.Future<_i2.IdServerUnbindResult>); + + @override + _i5.Future<_i2.IdServerUnbindResult> deactivateAccount({ + _i2.AuthenticationData? auth, + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #deactivateAccount, + [], + { + #auth: auth, + #idServer: idServer, + }, + ), + returnValue: _i5.Future<_i2.IdServerUnbindResult>.value( + _i2.IdServerUnbindResult.noSupport), + returnValueForMissingStub: _i5.Future<_i2.IdServerUnbindResult>.value( + _i2.IdServerUnbindResult.noSupport), + ) as _i5.Future<_i2.IdServerUnbindResult>); + + @override + _i5.Future<_i2.RequestTokenResponse> requestTokenToResetPasswordEmail( + String? clientSecret, + String? email, + int? sendAttempt, { + String? nextLink, + String? idAccessToken, + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #requestTokenToResetPasswordEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + returnValue: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenToResetPasswordEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenToResetPasswordEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + ) as _i5.Future<_i2.RequestTokenResponse>); + + @override + _i5.Future<_i2.RequestTokenResponse> requestTokenToResetPasswordMSISDN( + String? clientSecret, + String? country, + String? phoneNumber, + int? sendAttempt, { + String? nextLink, + String? idAccessToken, + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #requestTokenToResetPasswordMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + returnValue: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenToResetPasswordMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenToResetPasswordMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + ) as _i5.Future<_i2.RequestTokenResponse>); + + @override + _i5.Future<_i2.TokenOwnerInfo> getTokenOwner() => (super.noSuchMethod( + Invocation.method( + #getTokenOwner, + [], + ), + returnValue: + _i5.Future<_i2.TokenOwnerInfo>.value(_FakeTokenOwnerInfo_24( + this, + Invocation.method( + #getTokenOwner, + [], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.TokenOwnerInfo>.value(_FakeTokenOwnerInfo_24( + this, + Invocation.method( + #getTokenOwner, + [], + ), + )), + ) as _i5.Future<_i2.TokenOwnerInfo>); + + @override + _i5.Future<_i2.WhoIsInfo> getWhoIs(String? userId) => (super.noSuchMethod( + Invocation.method( + #getWhoIs, + [userId], + ), + returnValue: _i5.Future<_i2.WhoIsInfo>.value(_FakeWhoIsInfo_25( + this, + Invocation.method( + #getWhoIs, + [userId], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.WhoIsInfo>.value(_FakeWhoIsInfo_25( + this, + Invocation.method( + #getWhoIs, + [userId], + ), + )), + ) as _i5.Future<_i2.WhoIsInfo>); + + @override + _i5.Future<_i2.Capabilities> getCapabilities() => (super.noSuchMethod( + Invocation.method( + #getCapabilities, + [], + ), + returnValue: _i5.Future<_i2.Capabilities>.value(_FakeCapabilities_26( + this, + Invocation.method( + #getCapabilities, + [], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.Capabilities>.value(_FakeCapabilities_26( + this, + Invocation.method( + #getCapabilities, + [], + ), + )), + ) as _i5.Future<_i2.Capabilities>); + + @override + _i5.Future createRoom({ + Map? creationContent, + List<_i2.StateEvent>? initialState, + List? invite, + List<_i2.Invite3pid>? invite3pid, + bool? isDirect, + String? name, + Map? powerLevelContentOverride, + _i2.CreateRoomPreset? preset, + String? roomAliasName, + String? roomVersion, + String? topic, + _i2.Visibility? visibility, + }) => + (super.noSuchMethod( + Invocation.method( + #createRoom, + [], + { + #creationContent: creationContent, + #initialState: initialState, + #invite: invite, + #invite3pid: invite3pid, + #isDirect: isDirect, + #name: name, + #powerLevelContentOverride: powerLevelContentOverride, + #preset: preset, + #roomAliasName: roomAliasName, + #roomVersion: roomVersion, + #topic: topic, + #visibility: visibility, + }, + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #createRoom, + [], + { + #creationContent: creationContent, + #initialState: initialState, + #invite: invite, + #invite3pid: invite3pid, + #isDirect: isDirect, + #name: name, + #powerLevelContentOverride: powerLevelContentOverride, + #preset: preset, + #roomAliasName: roomAliasName, + #roomVersion: roomVersion, + #topic: topic, + #visibility: visibility, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #createRoom, + [], + { + #creationContent: creationContent, + #initialState: initialState, + #invite: invite, + #invite3pid: invite3pid, + #isDirect: isDirect, + #name: name, + #powerLevelContentOverride: powerLevelContentOverride, + #preset: preset, + #roomAliasName: roomAliasName, + #roomVersion: roomVersion, + #topic: topic, + #visibility: visibility, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future deleteDevices( + List? devices, { + _i2.AuthenticationData? auth, + }) => + (super.noSuchMethod( + Invocation.method( + #deleteDevices, + [devices], + {#auth: auth}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future?> getDevices() => (super.noSuchMethod( + Invocation.method( + #getDevices, + [], + ), + returnValue: _i5.Future?>.value(), + returnValueForMissingStub: _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future deleteDevice( + String? deviceId, { + _i2.AuthenticationData? auth, + }) => + (super.noSuchMethod( + Invocation.method( + #deleteDevice, + [deviceId], + {#auth: auth}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.Device> getDevice(String? deviceId) => (super.noSuchMethod( + Invocation.method( + #getDevice, + [deviceId], + ), + returnValue: _i5.Future<_i2.Device>.value(_FakeDevice_27( + this, + Invocation.method( + #getDevice, + [deviceId], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.Device>.value(_FakeDevice_27( + this, + Invocation.method( + #getDevice, + [deviceId], + ), + )), + ) as _i5.Future<_i2.Device>); + + @override + _i5.Future updateDevice( + String? deviceId, { + String? displayName, + }) => + (super.noSuchMethod( + Invocation.method( + #updateDevice, + [deviceId], + {#displayName: displayName}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future> updateAppserviceRoomDirectoryVisibility( + String? networkId, + String? roomId, + _i2.Visibility? visibility, + ) => + (super.noSuchMethod( + Invocation.method( + #updateAppserviceRoomDirectoryVisibility, + [ + networkId, + roomId, + visibility, + ], + ), + returnValue: + _i5.Future>.value({}), + returnValueForMissingStub: + _i5.Future>.value({}), + ) as _i5.Future>); + + @override + _i5.Future<_i2.Visibility?> getRoomVisibilityOnDirectory(String? roomId) => + (super.noSuchMethod( + Invocation.method( + #getRoomVisibilityOnDirectory, + [roomId], + ), + returnValue: _i5.Future<_i2.Visibility?>.value(), + returnValueForMissingStub: _i5.Future<_i2.Visibility?>.value(), + ) as _i5.Future<_i2.Visibility?>); + + @override + _i5.Future setRoomVisibilityOnDirectory( + String? roomId, { + _i2.Visibility? visibility, + }) => + (super.noSuchMethod( + Invocation.method( + #setRoomVisibilityOnDirectory, + [roomId], + {#visibility: visibility}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future deleteRoomAlias(String? roomAlias) => (super.noSuchMethod( + Invocation.method( + #deleteRoomAlias, + [roomAlias], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.GetRoomIdByAliasResponse> getRoomIdByAlias( + String? roomAlias) => + (super.noSuchMethod( + Invocation.method( + #getRoomIdByAlias, + [roomAlias], + ), + returnValue: _i5.Future<_i2.GetRoomIdByAliasResponse>.value( + _FakeGetRoomIdByAliasResponse_28( + this, + Invocation.method( + #getRoomIdByAlias, + [roomAlias], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetRoomIdByAliasResponse>.value( + _FakeGetRoomIdByAliasResponse_28( + this, + Invocation.method( + #getRoomIdByAlias, + [roomAlias], + ), + )), + ) as _i5.Future<_i2.GetRoomIdByAliasResponse>); + + @override + _i5.Future setRoomAlias( + String? roomAlias, + String? roomId, + ) => + (super.noSuchMethod( + Invocation.method( + #setRoomAlias, + [ + roomAlias, + roomId, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.GetEventsResponse> getEvents({ + String? from, + int? timeout, + }) => + (super.noSuchMethod( + Invocation.method( + #getEvents, + [], + { + #from: from, + #timeout: timeout, + }, + ), + returnValue: + _i5.Future<_i2.GetEventsResponse>.value(_FakeGetEventsResponse_29( + this, + Invocation.method( + #getEvents, + [], + { + #from: from, + #timeout: timeout, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetEventsResponse>.value(_FakeGetEventsResponse_29( + this, + Invocation.method( + #getEvents, + [], + { + #from: from, + #timeout: timeout, + }, + ), + )), + ) as _i5.Future<_i2.GetEventsResponse>); + + @override + _i5.Future<_i2.PeekEventsResponse> peekEvents({ + String? from, + int? timeout, + String? roomId, + }) => + (super.noSuchMethod( + Invocation.method( + #peekEvents, + [], + { + #from: from, + #timeout: timeout, + #roomId: roomId, + }, + ), + returnValue: + _i5.Future<_i2.PeekEventsResponse>.value(_FakePeekEventsResponse_30( + this, + Invocation.method( + #peekEvents, + [], + { + #from: from, + #timeout: timeout, + #roomId: roomId, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.PeekEventsResponse>.value(_FakePeekEventsResponse_30( + this, + Invocation.method( + #peekEvents, + [], + { + #from: from, + #timeout: timeout, + #roomId: roomId, + }, + ), + )), + ) as _i5.Future<_i2.PeekEventsResponse>); + + @override + _i5.Future<_i2.MatrixEvent> getOneEvent(String? eventId) => + (super.noSuchMethod( + Invocation.method( + #getOneEvent, + [eventId], + ), + returnValue: _i5.Future<_i2.MatrixEvent>.value(_FakeMatrixEvent_31( + this, + Invocation.method( + #getOneEvent, + [eventId], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.MatrixEvent>.value(_FakeMatrixEvent_31( + this, + Invocation.method( + #getOneEvent, + [eventId], + ), + )), + ) as _i5.Future<_i2.MatrixEvent>); + + @override + _i5.Future joinRoom( + String? roomIdOrAlias, { + List? serverName, + String? reason, + _i2.ThirdPartySigned? thirdPartySigned, + }) => + (super.noSuchMethod( + Invocation.method( + #joinRoom, + [roomIdOrAlias], + { + #serverName: serverName, + #reason: reason, + #thirdPartySigned: thirdPartySigned, + }, + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #joinRoom, + [roomIdOrAlias], + { + #serverName: serverName, + #reason: reason, + #thirdPartySigned: thirdPartySigned, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #joinRoom, + [roomIdOrAlias], + { + #serverName: serverName, + #reason: reason, + #thirdPartySigned: thirdPartySigned, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future> getJoinedRooms() => (super.noSuchMethod( + Invocation.method( + #getJoinedRooms, + [], + ), + returnValue: _i5.Future>.value([]), + returnValueForMissingStub: _i5.Future>.value([]), + ) as _i5.Future>); + + @override + _i5.Future<_i2.GetKeysChangesResponse> getKeysChanges( + String? from, + String? to, + ) => + (super.noSuchMethod( + Invocation.method( + #getKeysChanges, + [ + from, + to, + ], + ), + returnValue: _i5.Future<_i2.GetKeysChangesResponse>.value( + _FakeGetKeysChangesResponse_32( + this, + Invocation.method( + #getKeysChanges, + [ + from, + to, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.GetKeysChangesResponse>.value( + _FakeGetKeysChangesResponse_32( + this, + Invocation.method( + #getKeysChanges, + [ + from, + to, + ], + ), + )), + ) as _i5.Future<_i2.GetKeysChangesResponse>); + + @override + _i5.Future<_i2.ClaimKeysResponse> claimKeys( + Map>? oneTimeKeys, { + int? timeout, + }) => + (super.noSuchMethod( + Invocation.method( + #claimKeys, + [oneTimeKeys], + {#timeout: timeout}, + ), + returnValue: + _i5.Future<_i2.ClaimKeysResponse>.value(_FakeClaimKeysResponse_33( + this, + Invocation.method( + #claimKeys, + [oneTimeKeys], + {#timeout: timeout}, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.ClaimKeysResponse>.value(_FakeClaimKeysResponse_33( + this, + Invocation.method( + #claimKeys, + [oneTimeKeys], + {#timeout: timeout}, + ), + )), + ) as _i5.Future<_i2.ClaimKeysResponse>); + + @override + _i5.Future uploadCrossSigningKeys({ + _i2.AuthenticationData? auth, + _i2.MatrixCrossSigningKey? masterKey, + _i2.MatrixCrossSigningKey? selfSigningKey, + _i2.MatrixCrossSigningKey? userSigningKey, + }) => + (super.noSuchMethod( + Invocation.method( + #uploadCrossSigningKeys, + [], + { + #auth: auth, + #masterKey: masterKey, + #selfSigningKey: selfSigningKey, + #userSigningKey: userSigningKey, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.QueryKeysResponse> queryKeys( + Map>? deviceKeys, { + int? timeout, + String? token, + }) => + (super.noSuchMethod( + Invocation.method( + #queryKeys, + [deviceKeys], + { + #timeout: timeout, + #token: token, + }, + ), + returnValue: + _i5.Future<_i2.QueryKeysResponse>.value(_FakeQueryKeysResponse_34( + this, + Invocation.method( + #queryKeys, + [deviceKeys], + { + #timeout: timeout, + #token: token, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.QueryKeysResponse>.value(_FakeQueryKeysResponse_34( + this, + Invocation.method( + #queryKeys, + [deviceKeys], + { + #timeout: timeout, + #token: token, + }, + ), + )), + ) as _i5.Future<_i2.QueryKeysResponse>); + + @override + _i5.Future< + Map< + String, + Map>>?> uploadCrossSigningSignatures( + Map>>? signatures) => + (super.noSuchMethod( + Invocation.method( + #uploadCrossSigningSignatures, + [signatures], + ), + returnValue: + _i5.Future>>?>.value(), + returnValueForMissingStub: + _i5.Future>>?>.value(), + ) as _i5.Future>>?>); + + @override + _i5.Future knockRoom( + String? roomIdOrAlias, { + List? serverName, + String? reason, + }) => + (super.noSuchMethod( + Invocation.method( + #knockRoom, + [roomIdOrAlias], + { + #serverName: serverName, + #reason: reason, + }, + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #knockRoom, + [roomIdOrAlias], + { + #serverName: serverName, + #reason: reason, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #knockRoom, + [roomIdOrAlias], + { + #serverName: serverName, + #reason: reason, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future?> getLoginFlows() => (super.noSuchMethod( + Invocation.method( + #getLoginFlows, + [], + ), + returnValue: _i5.Future?>.value(), + returnValueForMissingStub: _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future<_i2.GetNotificationsResponse> getNotifications({ + String? from, + int? limit, + String? only, + }) => + (super.noSuchMethod( + Invocation.method( + #getNotifications, + [], + { + #from: from, + #limit: limit, + #only: only, + }, + ), + returnValue: _i5.Future<_i2.GetNotificationsResponse>.value( + _FakeGetNotificationsResponse_35( + this, + Invocation.method( + #getNotifications, + [], + { + #from: from, + #limit: limit, + #only: only, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetNotificationsResponse>.value( + _FakeGetNotificationsResponse_35( + this, + Invocation.method( + #getNotifications, + [], + { + #from: from, + #limit: limit, + #only: only, + }, + ), + )), + ) as _i5.Future<_i2.GetNotificationsResponse>); + + @override + _i5.Future<_i2.GetPresenceResponse> getPresence(String? userId) => + (super.noSuchMethod( + Invocation.method( + #getPresence, + [userId], + ), + returnValue: _i5.Future<_i2.GetPresenceResponse>.value( + _FakeGetPresenceResponse_36( + this, + Invocation.method( + #getPresence, + [userId], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.GetPresenceResponse>.value( + _FakeGetPresenceResponse_36( + this, + Invocation.method( + #getPresence, + [userId], + ), + )), + ) as _i5.Future<_i2.GetPresenceResponse>); + + @override + _i5.Future setPresence( + String? userId, + _i2.PresenceType? presence, { + String? statusMsg, + }) => + (super.noSuchMethod( + Invocation.method( + #setPresence, + [ + userId, + presence, + ], + {#statusMsg: statusMsg}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.ProfileInformation> getUserProfile(String? userId) => + (super.noSuchMethod( + Invocation.method( + #getUserProfile, + [userId], + ), + returnValue: + _i5.Future<_i2.ProfileInformation>.value(_FakeProfileInformation_37( + this, + Invocation.method( + #getUserProfile, + [userId], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.ProfileInformation>.value(_FakeProfileInformation_37( + this, + Invocation.method( + #getUserProfile, + [userId], + ), + )), + ) as _i5.Future<_i2.ProfileInformation>); + + @override + _i5.Future getAvatarUrl(String? userId) => (super.noSuchMethod( + Invocation.method( + #getAvatarUrl, + [userId], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setAvatarUrl( + String? userId, + Uri? avatarUrl, + ) => + (super.noSuchMethod( + Invocation.method( + #setAvatarUrl, + [ + userId, + avatarUrl, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future getDisplayName(String? userId) => (super.noSuchMethod( + Invocation.method( + #getDisplayName, + [userId], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setDisplayName( + String? userId, + String? displayname, + ) => + (super.noSuchMethod( + Invocation.method( + #setDisplayName, + [ + userId, + displayname, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.GetPublicRoomsResponse> getPublicRooms({ + int? limit, + String? since, + String? server, + }) => + (super.noSuchMethod( + Invocation.method( + #getPublicRooms, + [], + { + #limit: limit, + #since: since, + #server: server, + }, + ), + returnValue: _i5.Future<_i2.GetPublicRoomsResponse>.value( + _FakeGetPublicRoomsResponse_38( + this, + Invocation.method( + #getPublicRooms, + [], + { + #limit: limit, + #since: since, + #server: server, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.GetPublicRoomsResponse>.value( + _FakeGetPublicRoomsResponse_38( + this, + Invocation.method( + #getPublicRooms, + [], + { + #limit: limit, + #since: since, + #server: server, + }, + ), + )), + ) as _i5.Future<_i2.GetPublicRoomsResponse>); + + @override + _i5.Future<_i2.QueryPublicRoomsResponse> queryPublicRooms({ + String? server, + _i2.PublicRoomQueryFilter? filter, + bool? includeAllNetworks, + int? limit, + String? since, + String? thirdPartyInstanceId, + }) => + (super.noSuchMethod( + Invocation.method( + #queryPublicRooms, + [], + { + #server: server, + #filter: filter, + #includeAllNetworks: includeAllNetworks, + #limit: limit, + #since: since, + #thirdPartyInstanceId: thirdPartyInstanceId, + }, + ), + returnValue: _i5.Future<_i2.QueryPublicRoomsResponse>.value( + _FakeQueryPublicRoomsResponse_39( + this, + Invocation.method( + #queryPublicRooms, + [], + { + #server: server, + #filter: filter, + #includeAllNetworks: includeAllNetworks, + #limit: limit, + #since: since, + #thirdPartyInstanceId: thirdPartyInstanceId, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.QueryPublicRoomsResponse>.value( + _FakeQueryPublicRoomsResponse_39( + this, + Invocation.method( + #queryPublicRooms, + [], + { + #server: server, + #filter: filter, + #includeAllNetworks: includeAllNetworks, + #limit: limit, + #since: since, + #thirdPartyInstanceId: thirdPartyInstanceId, + }, + ), + )), + ) as _i5.Future<_i2.QueryPublicRoomsResponse>); + + @override + _i5.Future?> getPushers() => (super.noSuchMethod( + Invocation.method( + #getPushers, + [], + ), + returnValue: _i5.Future?>.value(), + returnValueForMissingStub: _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future<_i2.PushRuleSet> getPushRules() => (super.noSuchMethod( + Invocation.method( + #getPushRules, + [], + ), + returnValue: _i5.Future<_i2.PushRuleSet>.value(_FakePushRuleSet_40( + this, + Invocation.method( + #getPushRules, + [], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.PushRuleSet>.value(_FakePushRuleSet_40( + this, + Invocation.method( + #getPushRules, + [], + ), + )), + ) as _i5.Future<_i2.PushRuleSet>); + + @override + _i5.Future deletePushRule( + String? scope, + _i2.PushRuleKind? kind, + String? ruleId, + ) => + (super.noSuchMethod( + Invocation.method( + #deletePushRule, + [ + scope, + kind, + ruleId, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.PushRule> getPushRule( + String? scope, + _i2.PushRuleKind? kind, + String? ruleId, + ) => + (super.noSuchMethod( + Invocation.method( + #getPushRule, + [ + scope, + kind, + ruleId, + ], + ), + returnValue: _i5.Future<_i2.PushRule>.value(_FakePushRule_41( + this, + Invocation.method( + #getPushRule, + [ + scope, + kind, + ruleId, + ], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.PushRule>.value(_FakePushRule_41( + this, + Invocation.method( + #getPushRule, + [ + scope, + kind, + ruleId, + ], + ), + )), + ) as _i5.Future<_i2.PushRule>); + + @override + _i5.Future setPushRule( + String? scope, + _i2.PushRuleKind? kind, + String? ruleId, + List? actions, { + String? before, + String? after, + List<_i2.PushCondition>? conditions, + String? pattern, + }) => + (super.noSuchMethod( + Invocation.method( + #setPushRule, + [ + scope, + kind, + ruleId, + actions, + ], + { + #before: before, + #after: after, + #conditions: conditions, + #pattern: pattern, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future> getPushRuleActions( + String? scope, + _i2.PushRuleKind? kind, + String? ruleId, + ) => + (super.noSuchMethod( + Invocation.method( + #getPushRuleActions, + [ + scope, + kind, + ruleId, + ], + ), + returnValue: _i5.Future>.value([]), + returnValueForMissingStub: _i5.Future>.value([]), + ) as _i5.Future>); + + @override + _i5.Future setPushRuleActions( + String? scope, + _i2.PushRuleKind? kind, + String? ruleId, + List? actions, + ) => + (super.noSuchMethod( + Invocation.method( + #setPushRuleActions, + [ + scope, + kind, + ruleId, + actions, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future isPushRuleEnabled( + String? scope, + _i2.PushRuleKind? kind, + String? ruleId, + ) => + (super.noSuchMethod( + Invocation.method( + #isPushRuleEnabled, + [ + scope, + kind, + ruleId, + ], + ), + returnValue: _i5.Future.value(false), + returnValueForMissingStub: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future setPushRuleEnabled( + String? scope, + _i2.PushRuleKind? kind, + String? ruleId, + bool? enabled, + ) => + (super.noSuchMethod( + Invocation.method( + #setPushRuleEnabled, + [ + scope, + kind, + ruleId, + enabled, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.RefreshResponse> refresh(String? refreshToken) => + (super.noSuchMethod( + Invocation.method( + #refresh, + [refreshToken], + ), + returnValue: + _i5.Future<_i2.RefreshResponse>.value(_FakeRefreshResponse_42( + this, + Invocation.method( + #refresh, + [refreshToken], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.RefreshResponse>.value(_FakeRefreshResponse_42( + this, + Invocation.method( + #refresh, + [refreshToken], + ), + )), + ) as _i5.Future<_i2.RefreshResponse>); + + @override + _i5.Future checkUsernameAvailability(String? username) => + (super.noSuchMethod( + Invocation.method( + #checkUsernameAvailability, + [username], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.RequestTokenResponse> requestTokenToRegisterEmail( + String? clientSecret, + String? email, + int? sendAttempt, { + String? nextLink, + String? idAccessToken, + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #requestTokenToRegisterEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + returnValue: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenToRegisterEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenToRegisterEmail, + [ + clientSecret, + email, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + ) as _i5.Future<_i2.RequestTokenResponse>); + + @override + _i5.Future<_i2.RequestTokenResponse> requestTokenToRegisterMSISDN( + String? clientSecret, + String? country, + String? phoneNumber, + int? sendAttempt, { + String? nextLink, + String? idAccessToken, + String? idServer, + }) => + (super.noSuchMethod( + Invocation.method( + #requestTokenToRegisterMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + returnValue: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenToRegisterMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RequestTokenResponse>.value( + _FakeRequestTokenResponse_23( + this, + Invocation.method( + #requestTokenToRegisterMSISDN, + [ + clientSecret, + country, + phoneNumber, + sendAttempt, + ], + { + #nextLink: nextLink, + #idAccessToken: idAccessToken, + #idServer: idServer, + }, + ), + )), + ) as _i5.Future<_i2.RequestTokenResponse>); + + @override + _i5.Future<_i2.RoomKeysUpdateResponse> deleteRoomKeys(String? version) => + (super.noSuchMethod( + Invocation.method( + #deleteRoomKeys, + [version], + ), + returnValue: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #deleteRoomKeys, + [version], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #deleteRoomKeys, + [version], + ), + )), + ) as _i5.Future<_i2.RoomKeysUpdateResponse>); + + @override + _i5.Future<_i2.RoomKeys> getRoomKeys(String? version) => (super.noSuchMethod( + Invocation.method( + #getRoomKeys, + [version], + ), + returnValue: _i5.Future<_i2.RoomKeys>.value(_FakeRoomKeys_43( + this, + Invocation.method( + #getRoomKeys, + [version], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.RoomKeys>.value(_FakeRoomKeys_43( + this, + Invocation.method( + #getRoomKeys, + [version], + ), + )), + ) as _i5.Future<_i2.RoomKeys>); + + @override + _i5.Future<_i2.RoomKeysUpdateResponse> putRoomKeys( + String? version, + _i2.RoomKeys? backupData, + ) => + (super.noSuchMethod( + Invocation.method( + #putRoomKeys, + [ + version, + backupData, + ], + ), + returnValue: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #putRoomKeys, + [ + version, + backupData, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #putRoomKeys, + [ + version, + backupData, + ], + ), + )), + ) as _i5.Future<_i2.RoomKeysUpdateResponse>); + + @override + _i5.Future<_i2.RoomKeysUpdateResponse> deleteRoomKeysByRoomId( + String? roomId, + String? version, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRoomKeysByRoomId, + [ + roomId, + version, + ], + ), + returnValue: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #deleteRoomKeysByRoomId, + [ + roomId, + version, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #deleteRoomKeysByRoomId, + [ + roomId, + version, + ], + ), + )), + ) as _i5.Future<_i2.RoomKeysUpdateResponse>); + + @override + _i5.Future<_i2.RoomKeyBackup> getRoomKeysByRoomId( + String? roomId, + String? version, + ) => + (super.noSuchMethod( + Invocation.method( + #getRoomKeysByRoomId, + [ + roomId, + version, + ], + ), + returnValue: _i5.Future<_i2.RoomKeyBackup>.value(_FakeRoomKeyBackup_44( + this, + Invocation.method( + #getRoomKeysByRoomId, + [ + roomId, + version, + ], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.RoomKeyBackup>.value(_FakeRoomKeyBackup_44( + this, + Invocation.method( + #getRoomKeysByRoomId, + [ + roomId, + version, + ], + ), + )), + ) as _i5.Future<_i2.RoomKeyBackup>); + + @override + _i5.Future<_i2.RoomKeysUpdateResponse> putRoomKeysByRoomId( + String? roomId, + String? version, + _i2.RoomKeyBackup? backupData, + ) => + (super.noSuchMethod( + Invocation.method( + #putRoomKeysByRoomId, + [ + roomId, + version, + backupData, + ], + ), + returnValue: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #putRoomKeysByRoomId, + [ + roomId, + version, + backupData, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #putRoomKeysByRoomId, + [ + roomId, + version, + backupData, + ], + ), + )), + ) as _i5.Future<_i2.RoomKeysUpdateResponse>); + + @override + _i5.Future<_i2.RoomKeysUpdateResponse> deleteRoomKeyBySessionId( + String? roomId, + String? sessionId, + String? version, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + returnValue: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #deleteRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #deleteRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + )), + ) as _i5.Future<_i2.RoomKeysUpdateResponse>); + + @override + _i5.Future<_i2.KeyBackupData> getRoomKeyBySessionId( + String? roomId, + String? sessionId, + String? version, + ) => + (super.noSuchMethod( + Invocation.method( + #getRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + returnValue: _i5.Future<_i2.KeyBackupData>.value(_FakeKeyBackupData_16( + this, + Invocation.method( + #getRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.KeyBackupData>.value(_FakeKeyBackupData_16( + this, + Invocation.method( + #getRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + ], + ), + )), + ) as _i5.Future<_i2.KeyBackupData>); + + @override + _i5.Future<_i2.RoomKeysUpdateResponse> putRoomKeyBySessionId( + String? roomId, + String? sessionId, + String? version, + _i2.KeyBackupData? data, + ) => + (super.noSuchMethod( + Invocation.method( + #putRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + data, + ], + ), + returnValue: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #putRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + data, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.RoomKeysUpdateResponse>.value( + _FakeRoomKeysUpdateResponse_15( + this, + Invocation.method( + #putRoomKeyBySessionId, + [ + roomId, + sessionId, + version, + data, + ], + ), + )), + ) as _i5.Future<_i2.RoomKeysUpdateResponse>); + + @override + _i5.Future<_i2.GetRoomKeysVersionCurrentResponse> + getRoomKeysVersionCurrent() => (super.noSuchMethod( + Invocation.method( + #getRoomKeysVersionCurrent, + [], + ), + returnValue: + _i5.Future<_i2.GetRoomKeysVersionCurrentResponse>.value( + _FakeGetRoomKeysVersionCurrentResponse_45( + this, + Invocation.method( + #getRoomKeysVersionCurrent, + [], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetRoomKeysVersionCurrentResponse>.value( + _FakeGetRoomKeysVersionCurrentResponse_45( + this, + Invocation.method( + #getRoomKeysVersionCurrent, + [], + ), + )), + ) as _i5.Future<_i2.GetRoomKeysVersionCurrentResponse>); + + @override + _i5.Future postRoomKeysVersion( + _i2.BackupAlgorithm? algorithm, + Map? authData, + ) => + (super.noSuchMethod( + Invocation.method( + #postRoomKeysVersion, + [ + algorithm, + authData, + ], + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #postRoomKeysVersion, + [ + algorithm, + authData, + ], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #postRoomKeysVersion, + [ + algorithm, + authData, + ], + ), + )), + ) as _i5.Future); + + @override + _i5.Future deleteRoomKeysVersion(String? version) => + (super.noSuchMethod( + Invocation.method( + #deleteRoomKeysVersion, + [version], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.GetRoomKeysVersionResponse> getRoomKeysVersion( + String? version) => + (super.noSuchMethod( + Invocation.method( + #getRoomKeysVersion, + [version], + ), + returnValue: _i5.Future<_i2.GetRoomKeysVersionResponse>.value( + _FakeGetRoomKeysVersionResponse_46( + this, + Invocation.method( + #getRoomKeysVersion, + [version], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.GetRoomKeysVersionResponse>.value( + _FakeGetRoomKeysVersionResponse_46( + this, + Invocation.method( + #getRoomKeysVersion, + [version], + ), + )), + ) as _i5.Future<_i2.GetRoomKeysVersionResponse>); + + @override + _i5.Future> putRoomKeysVersion( + String? version, + _i2.BackupAlgorithm? algorithm, + Map? authData, + ) => + (super.noSuchMethod( + Invocation.method( + #putRoomKeysVersion, + [ + version, + algorithm, + authData, + ], + ), + returnValue: + _i5.Future>.value({}), + returnValueForMissingStub: + _i5.Future>.value({}), + ) as _i5.Future>); + + @override + _i5.Future> getLocalAliases(String? roomId) => + (super.noSuchMethod( + Invocation.method( + #getLocalAliases, + [roomId], + ), + returnValue: _i5.Future>.value([]), + returnValueForMissingStub: _i5.Future>.value([]), + ) as _i5.Future>); + + @override + _i5.Future ban( + String? roomId, + String? userId, { + String? reason, + }) => + (super.noSuchMethod( + Invocation.method( + #ban, + [ + roomId, + userId, + ], + {#reason: reason}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.EventContext> getEventContext( + String? roomId, + String? eventId, { + int? limit, + String? filter, + }) => + (super.noSuchMethod( + Invocation.method( + #getEventContext, + [ + roomId, + eventId, + ], + { + #limit: limit, + #filter: filter, + }, + ), + returnValue: _i5.Future<_i2.EventContext>.value(_FakeEventContext_47( + this, + Invocation.method( + #getEventContext, + [ + roomId, + eventId, + ], + { + #limit: limit, + #filter: filter, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.EventContext>.value(_FakeEventContext_47( + this, + Invocation.method( + #getEventContext, + [ + roomId, + eventId, + ], + { + #limit: limit, + #filter: filter, + }, + ), + )), + ) as _i5.Future<_i2.EventContext>); + + @override + _i5.Future<_i2.MatrixEvent> getOneRoomEvent( + String? roomId, + String? eventId, + ) => + (super.noSuchMethod( + Invocation.method( + #getOneRoomEvent, + [ + roomId, + eventId, + ], + ), + returnValue: _i5.Future<_i2.MatrixEvent>.value(_FakeMatrixEvent_31( + this, + Invocation.method( + #getOneRoomEvent, + [ + roomId, + eventId, + ], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.MatrixEvent>.value(_FakeMatrixEvent_31( + this, + Invocation.method( + #getOneRoomEvent, + [ + roomId, + eventId, + ], + ), + )), + ) as _i5.Future<_i2.MatrixEvent>); + + @override + _i5.Future forgetRoom(String? roomId) => (super.noSuchMethod( + Invocation.method( + #forgetRoom, + [roomId], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future inviteBy3PID( + String? roomId, + String? address, + String? idAccessToken, + String? idServer, + String? medium, + ) => + (super.noSuchMethod( + Invocation.method( + #inviteBy3PID, + [ + roomId, + address, + idAccessToken, + idServer, + medium, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future inviteUser( + String? roomId, + String? userId, { + String? reason, + }) => + (super.noSuchMethod( + Invocation.method( + #inviteUser, + [ + roomId, + userId, + ], + {#reason: reason}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future joinRoomById( + String? roomId, { + String? reason, + _i2.ThirdPartySigned? thirdPartySigned, + }) => + (super.noSuchMethod( + Invocation.method( + #joinRoomById, + [roomId], + { + #reason: reason, + #thirdPartySigned: thirdPartySigned, + }, + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #joinRoomById, + [roomId], + { + #reason: reason, + #thirdPartySigned: thirdPartySigned, + }, + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #joinRoomById, + [roomId], + { + #reason: reason, + #thirdPartySigned: thirdPartySigned, + }, + ), + )), + ) as _i5.Future); + + @override + _i5.Future?> getJoinedMembersByRoom( + String? roomId) => + (super.noSuchMethod( + Invocation.method( + #getJoinedMembersByRoom, + [roomId], + ), + returnValue: _i5.Future?>.value(), + returnValueForMissingStub: + _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future kick( + String? roomId, + String? userId, { + String? reason, + }) => + (super.noSuchMethod( + Invocation.method( + #kick, + [ + roomId, + userId, + ], + {#reason: reason}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future leaveRoom( + String? roomId, { + String? reason, + }) => + (super.noSuchMethod( + Invocation.method( + #leaveRoom, + [roomId], + {#reason: reason}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future?> getMembersByRoom( + String? roomId, { + String? at, + _i2.Membership? membership, + _i2.Membership? notMembership, + }) => + (super.noSuchMethod( + Invocation.method( + #getMembersByRoom, + [roomId], + { + #at: at, + #membership: membership, + #notMembership: notMembership, + }, + ), + returnValue: _i5.Future?>.value(), + returnValueForMissingStub: _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future<_i2.GetRoomEventsResponse> getRoomEvents( + String? roomId, + _i2.Direction? dir, { + String? from, + String? to, + int? limit, + String? filter, + }) => + (super.noSuchMethod( + Invocation.method( + #getRoomEvents, + [ + roomId, + dir, + ], + { + #from: from, + #to: to, + #limit: limit, + #filter: filter, + }, + ), + returnValue: _i5.Future<_i2.GetRoomEventsResponse>.value( + _FakeGetRoomEventsResponse_48( + this, + Invocation.method( + #getRoomEvents, + [ + roomId, + dir, + ], + { + #from: from, + #to: to, + #limit: limit, + #filter: filter, + }, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.GetRoomEventsResponse>.value( + _FakeGetRoomEventsResponse_48( + this, + Invocation.method( + #getRoomEvents, + [ + roomId, + dir, + ], + { + #from: from, + #to: to, + #limit: limit, + #filter: filter, + }, + ), + )), + ) as _i5.Future<_i2.GetRoomEventsResponse>); + + @override + _i5.Future setReadMarker( + String? roomId, { + String? mFullyRead, + String? mRead, + String? mReadPrivate, + }) => + (super.noSuchMethod( + Invocation.method( + #setReadMarker, + [roomId], + { + #mFullyRead: mFullyRead, + #mRead: mRead, + #mReadPrivate: mReadPrivate, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future postReceipt( + String? roomId, + _i2.ReceiptType? receiptType, + String? eventId, { + String? threadId, + }) => + (super.noSuchMethod( + Invocation.method( + #postReceipt, + [ + roomId, + receiptType, + eventId, + ], + {#threadId: threadId}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future redactEvent( + String? roomId, + String? eventId, + String? txnId, { + String? reason, + }) => + (super.noSuchMethod( + Invocation.method( + #redactEvent, + [ + roomId, + eventId, + txnId, + ], + {#reason: reason}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future reportContent( + String? roomId, + String? eventId, { + String? reason, + int? score, + }) => + (super.noSuchMethod( + Invocation.method( + #reportContent, + [ + roomId, + eventId, + ], + { + #reason: reason, + #score: score, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future sendMessage( + String? roomId, + String? eventType, + String? txnId, + Map? body, + ) => + (super.noSuchMethod( + Invocation.method( + #sendMessage, + [ + roomId, + eventType, + txnId, + body, + ], + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #sendMessage, + [ + roomId, + eventType, + txnId, + body, + ], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #sendMessage, + [ + roomId, + eventType, + txnId, + body, + ], + ), + )), + ) as _i5.Future); + + @override + _i5.Future> getRoomState(String? roomId) => + (super.noSuchMethod( + Invocation.method( + #getRoomState, + [roomId], + ), + returnValue: + _i5.Future>.value(<_i2.MatrixEvent>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i2.MatrixEvent>[]), + ) as _i5.Future>); + + @override + _i5.Future> getRoomStateWithKey( + String? roomId, + String? eventType, + String? stateKey, + ) => + (super.noSuchMethod( + Invocation.method( + #getRoomStateWithKey, + [ + roomId, + eventType, + stateKey, + ], + ), + returnValue: + _i5.Future>.value({}), + returnValueForMissingStub: + _i5.Future>.value({}), + ) as _i5.Future>); + + @override + _i5.Future setRoomStateWithKey( + String? roomId, + String? eventType, + String? stateKey, + Map? body, + ) => + (super.noSuchMethod( + Invocation.method( + #setRoomStateWithKey, + [ + roomId, + eventType, + stateKey, + body, + ], + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #setRoomStateWithKey, + [ + roomId, + eventType, + stateKey, + body, + ], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #setRoomStateWithKey, + [ + roomId, + eventType, + stateKey, + body, + ], + ), + )), + ) as _i5.Future); + + @override + _i5.Future unban( + String? roomId, + String? userId, { + String? reason, + }) => + (super.noSuchMethod( + Invocation.method( + #unban, + [ + roomId, + userId, + ], + {#reason: reason}, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future upgradeRoom( + String? roomId, + String? newVersion, + ) => + (super.noSuchMethod( + Invocation.method( + #upgradeRoom, + [ + roomId, + newVersion, + ], + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #upgradeRoom, + [ + roomId, + newVersion, + ], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #upgradeRoom, + [ + roomId, + newVersion, + ], + ), + )), + ) as _i5.Future); + + @override + _i5.Future<_i2.SearchResults> search( + _i2.Categories? searchCategories, { + String? nextBatch, + }) => + (super.noSuchMethod( + Invocation.method( + #search, + [searchCategories], + {#nextBatch: nextBatch}, + ), + returnValue: _i5.Future<_i2.SearchResults>.value(_FakeSearchResults_49( + this, + Invocation.method( + #search, + [searchCategories], + {#nextBatch: nextBatch}, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.SearchResults>.value(_FakeSearchResults_49( + this, + Invocation.method( + #search, + [searchCategories], + {#nextBatch: nextBatch}, + ), + )), + ) as _i5.Future<_i2.SearchResults>); + + @override + _i5.Future<_i2.SyncUpdate> sync({ + String? filter, + String? since, + bool? fullState, + _i2.PresenceType? setPresence, + int? timeout, + }) => + (super.noSuchMethod( + Invocation.method( + #sync, + [], + { + #filter: filter, + #since: since, + #fullState: fullState, + #setPresence: setPresence, + #timeout: timeout, + }, + ), + returnValue: _i5.Future<_i2.SyncUpdate>.value(_FakeSyncUpdate_12( + this, + Invocation.method( + #sync, + [], + { + #filter: filter, + #since: since, + #fullState: fullState, + #setPresence: setPresence, + #timeout: timeout, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.SyncUpdate>.value(_FakeSyncUpdate_12( + this, + Invocation.method( + #sync, + [], + { + #filter: filter, + #since: since, + #fullState: fullState, + #setPresence: setPresence, + #timeout: timeout, + }, + ), + )), + ) as _i5.Future<_i2.SyncUpdate>); + + @override + _i5.Future> queryLocationByAlias(String? alias) => + (super.noSuchMethod( + Invocation.method( + #queryLocationByAlias, + [alias], + ), + returnValue: _i5.Future>.value(<_i2.Location>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i2.Location>[]), + ) as _i5.Future>); + + @override + _i5.Future> queryLocationByProtocol( + String? protocol, { + String? searchFields, + }) => + (super.noSuchMethod( + Invocation.method( + #queryLocationByProtocol, + [protocol], + {#searchFields: searchFields}, + ), + returnValue: _i5.Future>.value(<_i2.Location>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i2.Location>[]), + ) as _i5.Future>); + + @override + _i5.Future<_i2.Protocol> getProtocolMetadata(String? protocol) => + (super.noSuchMethod( + Invocation.method( + #getProtocolMetadata, + [protocol], + ), + returnValue: _i5.Future<_i2.Protocol>.value(_FakeProtocol_50( + this, + Invocation.method( + #getProtocolMetadata, + [protocol], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.Protocol>.value(_FakeProtocol_50( + this, + Invocation.method( + #getProtocolMetadata, + [protocol], + ), + )), + ) as _i5.Future<_i2.Protocol>); + + @override + _i5.Future> getProtocols() => (super.noSuchMethod( + Invocation.method( + #getProtocols, + [], + ), + returnValue: _i5.Future>.value( + {}), + returnValueForMissingStub: _i5.Future>.value( + {}), + ) as _i5.Future>); + + @override + _i5.Future> queryUserByID(String? userid) => + (super.noSuchMethod( + Invocation.method( + #queryUserByID, + [userid], + ), + returnValue: + _i5.Future>.value(<_i2.ThirdPartyUser>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i2.ThirdPartyUser>[]), + ) as _i5.Future>); + + @override + _i5.Future> queryUserByProtocol( + String? protocol, { + String? fields, + }) => + (super.noSuchMethod( + Invocation.method( + #queryUserByProtocol, + [protocol], + {#fields: fields}, + ), + returnValue: + _i5.Future>.value(<_i2.ThirdPartyUser>[]), + returnValueForMissingStub: + _i5.Future>.value(<_i2.ThirdPartyUser>[]), + ) as _i5.Future>); + + @override + _i5.Future> getAccountData( + String? userId, + String? type, + ) => + (super.noSuchMethod( + Invocation.method( + #getAccountData, + [ + userId, + type, + ], + ), + returnValue: + _i5.Future>.value({}), + returnValueForMissingStub: + _i5.Future>.value({}), + ) as _i5.Future>); + + @override + _i5.Future setAccountData( + String? userId, + String? type, + Map? content, + ) => + (super.noSuchMethod( + Invocation.method( + #setAccountData, + [ + userId, + type, + content, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future defineFilter( + String? userId, + _i2.Filter? filter, + ) => + (super.noSuchMethod( + Invocation.method( + #defineFilter, + [ + userId, + filter, + ], + ), + returnValue: _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #defineFilter, + [ + userId, + filter, + ], + ), + )), + returnValueForMissingStub: + _i5.Future.value(_i10.dummyValue( + this, + Invocation.method( + #defineFilter, + [ + userId, + filter, + ], + ), + )), + ) as _i5.Future); + + @override + _i5.Future<_i2.Filter> getFilter( + String? userId, + String? filterId, + ) => + (super.noSuchMethod( + Invocation.method( + #getFilter, + [ + userId, + filterId, + ], + ), + returnValue: _i5.Future<_i2.Filter>.value(_FakeFilter_0( + this, + Invocation.method( + #getFilter, + [ + userId, + filterId, + ], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.Filter>.value(_FakeFilter_0( + this, + Invocation.method( + #getFilter, + [ + userId, + filterId, + ], + ), + )), + ) as _i5.Future<_i2.Filter>); + + @override + _i5.Future<_i2.OpenIdCredentials> requestOpenIdToken( + String? userId, + Map? body, + ) => + (super.noSuchMethod( + Invocation.method( + #requestOpenIdToken, + [ + userId, + body, + ], + ), + returnValue: + _i5.Future<_i2.OpenIdCredentials>.value(_FakeOpenIdCredentials_51( + this, + Invocation.method( + #requestOpenIdToken, + [ + userId, + body, + ], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.OpenIdCredentials>.value(_FakeOpenIdCredentials_51( + this, + Invocation.method( + #requestOpenIdToken, + [ + userId, + body, + ], + ), + )), + ) as _i5.Future<_i2.OpenIdCredentials>); + + @override + _i5.Future> getAccountDataPerRoom( + String? userId, + String? roomId, + String? type, + ) => + (super.noSuchMethod( + Invocation.method( + #getAccountDataPerRoom, + [ + userId, + roomId, + type, + ], + ), + returnValue: + _i5.Future>.value({}), + returnValueForMissingStub: + _i5.Future>.value({}), + ) as _i5.Future>); + + @override + _i5.Future setAccountDataPerRoom( + String? userId, + String? roomId, + String? type, + Map? content, + ) => + (super.noSuchMethod( + Invocation.method( + #setAccountDataPerRoom, + [ + userId, + roomId, + type, + content, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future?> getRoomTags( + String? userId, + String? roomId, + ) => + (super.noSuchMethod( + Invocation.method( + #getRoomTags, + [ + userId, + roomId, + ], + ), + returnValue: _i5.Future?>.value(), + returnValueForMissingStub: _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future deleteRoomTag( + String? userId, + String? roomId, + String? tag, + ) => + (super.noSuchMethod( + Invocation.method( + #deleteRoomTag, + [ + userId, + roomId, + tag, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setRoomTag( + String? userId, + String? roomId, + String? tag, { + double? order, + Map? additionalProperties = const {}, + }) => + (super.noSuchMethod( + Invocation.method( + #setRoomTag, + [ + userId, + roomId, + tag, + ], + { + #order: order, + #additionalProperties: additionalProperties, + }, + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future<_i2.SearchUserDirectoryResponse> searchUserDirectory( + String? searchTerm, { + int? limit, + }) => + (super.noSuchMethod( + Invocation.method( + #searchUserDirectory, + [searchTerm], + {#limit: limit}, + ), + returnValue: _i5.Future<_i2.SearchUserDirectoryResponse>.value( + _FakeSearchUserDirectoryResponse_52( + this, + Invocation.method( + #searchUserDirectory, + [searchTerm], + {#limit: limit}, + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.SearchUserDirectoryResponse>.value( + _FakeSearchUserDirectoryResponse_52( + this, + Invocation.method( + #searchUserDirectory, + [searchTerm], + {#limit: limit}, + ), + )), + ) as _i5.Future<_i2.SearchUserDirectoryResponse>); + + @override + _i5.Future<_i2.GetVersionsResponse> getVersions() => (super.noSuchMethod( + Invocation.method( + #getVersions, + [], + ), + returnValue: _i5.Future<_i2.GetVersionsResponse>.value( + _FakeGetVersionsResponse_53( + this, + Invocation.method( + #getVersions, + [], + ), + )), + returnValueForMissingStub: _i5.Future<_i2.GetVersionsResponse>.value( + _FakeGetVersionsResponse_53( + this, + Invocation.method( + #getVersions, + [], + ), + )), + ) as _i5.Future<_i2.GetVersionsResponse>); + + @override + _i5.Future<_i2.ServerConfig> getConfig() => (super.noSuchMethod( + Invocation.method( + #getConfig, + [], + ), + returnValue: _i5.Future<_i2.ServerConfig>.value(_FakeServerConfig_54( + this, + Invocation.method( + #getConfig, + [], + ), + )), + returnValueForMissingStub: + _i5.Future<_i2.ServerConfig>.value(_FakeServerConfig_54( + this, + Invocation.method( + #getConfig, + [], + ), + )), + ) as _i5.Future<_i2.ServerConfig>); + + @override + _i5.Future<_i6.FileResponse> getContent( + String? serverName, + String? mediaId, { + bool? allowRemote, + }) => + (super.noSuchMethod( + Invocation.method( + #getContent, + [ + serverName, + mediaId, + ], + {#allowRemote: allowRemote}, + ), + returnValue: _i5.Future<_i6.FileResponse>.value(_FakeFileResponse_55( + this, + Invocation.method( + #getContent, + [ + serverName, + mediaId, + ], + {#allowRemote: allowRemote}, + ), + )), + returnValueForMissingStub: + _i5.Future<_i6.FileResponse>.value(_FakeFileResponse_55( + this, + Invocation.method( + #getContent, + [ + serverName, + mediaId, + ], + {#allowRemote: allowRemote}, + ), + )), + ) as _i5.Future<_i6.FileResponse>); + + @override + _i5.Future<_i6.FileResponse> getContentOverrideName( + String? serverName, + String? mediaId, + String? fileName, { + bool? allowRemote, + }) => + (super.noSuchMethod( + Invocation.method( + #getContentOverrideName, + [ + serverName, + mediaId, + fileName, + ], + {#allowRemote: allowRemote}, + ), + returnValue: _i5.Future<_i6.FileResponse>.value(_FakeFileResponse_55( + this, + Invocation.method( + #getContentOverrideName, + [ + serverName, + mediaId, + fileName, + ], + {#allowRemote: allowRemote}, + ), + )), + returnValueForMissingStub: + _i5.Future<_i6.FileResponse>.value(_FakeFileResponse_55( + this, + Invocation.method( + #getContentOverrideName, + [ + serverName, + mediaId, + fileName, + ], + {#allowRemote: allowRemote}, + ), + )), + ) as _i5.Future<_i6.FileResponse>); + + @override + _i5.Future<_i2.GetUrlPreviewResponse> getUrlPreview( + Uri? url, { + int? ts, + }) => + (super.noSuchMethod( + Invocation.method( + #getUrlPreview, + [url], + {#ts: ts}, + ), + returnValue: _i5.Future<_i2.GetUrlPreviewResponse>.value( + _FakeGetUrlPreviewResponse_56( + this, + Invocation.method( + #getUrlPreview, + [url], + {#ts: ts}, + ), + )), + returnValueForMissingStub: _i5.Future<_i2.GetUrlPreviewResponse>.value( + _FakeGetUrlPreviewResponse_56( + this, + Invocation.method( + #getUrlPreview, + [url], + {#ts: ts}, + ), + )), + ) as _i5.Future<_i2.GetUrlPreviewResponse>); + + @override + _i5.Future<_i6.FileResponse> getContentThumbnail( + String? serverName, + String? mediaId, + int? width, + int? height, { + _i2.Method? method, + bool? allowRemote, + }) => + (super.noSuchMethod( + Invocation.method( + #getContentThumbnail, + [ + serverName, + mediaId, + width, + height, + ], + { + #method: method, + #allowRemote: allowRemote, + }, + ), + returnValue: _i5.Future<_i6.FileResponse>.value(_FakeFileResponse_55( + this, + Invocation.method( + #getContentThumbnail, + [ + serverName, + mediaId, + width, + height, + ], + { + #method: method, + #allowRemote: allowRemote, + }, + ), + )), + returnValueForMissingStub: + _i5.Future<_i6.FileResponse>.value(_FakeFileResponse_55( + this, + Invocation.method( + #getContentThumbnail, + [ + serverName, + mediaId, + width, + height, + ], + { + #method: method, + #allowRemote: allowRemote, + }, + ), + )), + ) as _i5.Future<_i6.FileResponse>); +} + +/// A class which mocks [MatrixLocalizations]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockMatrixLocalizations extends _i1.Mock + implements _i2.MatrixLocalizations { + @override + String get emptyChat => (super.noSuchMethod( + Invocation.getter(#emptyChat), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#emptyChat), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#emptyChat), + ), + ) as String); + + @override + String get invitedUsersOnly => (super.noSuchMethod( + Invocation.getter(#invitedUsersOnly), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#invitedUsersOnly), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#invitedUsersOnly), + ), + ) as String); + + @override + String get fromTheInvitation => (super.noSuchMethod( + Invocation.getter(#fromTheInvitation), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#fromTheInvitation), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#fromTheInvitation), + ), + ) as String); + + @override + String get fromJoining => (super.noSuchMethod( + Invocation.getter(#fromJoining), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#fromJoining), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#fromJoining), + ), + ) as String); + + @override + String get visibleForAllParticipants => (super.noSuchMethod( + Invocation.getter(#visibleForAllParticipants), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#visibleForAllParticipants), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#visibleForAllParticipants), + ), + ) as String); + + @override + String get visibleForEveryone => (super.noSuchMethod( + Invocation.getter(#visibleForEveryone), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#visibleForEveryone), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#visibleForEveryone), + ), + ) as String); + + @override + String get guestsCanJoin => (super.noSuchMethod( + Invocation.getter(#guestsCanJoin), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#guestsCanJoin), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#guestsCanJoin), + ), + ) as String); + + @override + String get guestsAreForbidden => (super.noSuchMethod( + Invocation.getter(#guestsAreForbidden), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#guestsAreForbidden), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#guestsAreForbidden), + ), + ) as String); + + @override + String get anyoneCanJoin => (super.noSuchMethod( + Invocation.getter(#anyoneCanJoin), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#anyoneCanJoin), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#anyoneCanJoin), + ), + ) as String); + + @override + String get needPantalaimonWarning => (super.noSuchMethod( + Invocation.getter(#needPantalaimonWarning), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#needPantalaimonWarning), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#needPantalaimonWarning), + ), + ) as String); + + @override + String get channelCorruptedDecryptError => (super.noSuchMethod( + Invocation.getter(#channelCorruptedDecryptError), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#channelCorruptedDecryptError), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#channelCorruptedDecryptError), + ), + ) as String); + + @override + String get encryptionNotEnabled => (super.noSuchMethod( + Invocation.getter(#encryptionNotEnabled), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#encryptionNotEnabled), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#encryptionNotEnabled), + ), + ) as String); + + @override + String get unknownEncryptionAlgorithm => (super.noSuchMethod( + Invocation.getter(#unknownEncryptionAlgorithm), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#unknownEncryptionAlgorithm), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#unknownEncryptionAlgorithm), + ), + ) as String); + + @override + String get noPermission => (super.noSuchMethod( + Invocation.getter(#noPermission), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#noPermission), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#noPermission), + ), + ) as String); + + @override + String get you => (super.noSuchMethod( + Invocation.getter(#you), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#you), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#you), + ), + ) as String); + + @override + String get roomHasBeenUpgraded => (super.noSuchMethod( + Invocation.getter(#roomHasBeenUpgraded), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#roomHasBeenUpgraded), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#roomHasBeenUpgraded), + ), + ) as String); + + @override + String get youAcceptedTheInvitation => (super.noSuchMethod( + Invocation.getter(#youAcceptedTheInvitation), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#youAcceptedTheInvitation), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#youAcceptedTheInvitation), + ), + ) as String); + + @override + String get youRejectedTheInvitation => (super.noSuchMethod( + Invocation.getter(#youRejectedTheInvitation), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#youRejectedTheInvitation), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#youRejectedTheInvitation), + ), + ) as String); + + @override + String get youJoinedTheChat => (super.noSuchMethod( + Invocation.getter(#youJoinedTheChat), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#youJoinedTheChat), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#youJoinedTheChat), + ), + ) as String); + + @override + String get unknownUser => (super.noSuchMethod( + Invocation.getter(#unknownUser), + returnValue: _i10.dummyValue( + this, + Invocation.getter(#unknownUser), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.getter(#unknownUser), + ), + ) as String); + + @override + String youInvitedBy(String? senderName) => (super.noSuchMethod( + Invocation.method( + #youInvitedBy, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #youInvitedBy, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #youInvitedBy, + [senderName], + ), + ), + ) as String); + + @override + String youInvitedUser(String? targetName) => (super.noSuchMethod( + Invocation.method( + #youInvitedUser, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #youInvitedUser, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #youInvitedUser, + [targetName], + ), + ), + ) as String); + + @override + String youUnbannedUser(String? targetName) => (super.noSuchMethod( + Invocation.method( + #youUnbannedUser, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #youUnbannedUser, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #youUnbannedUser, + [targetName], + ), + ), + ) as String); + + @override + String youBannedUser(String? targetName) => (super.noSuchMethod( + Invocation.method( + #youBannedUser, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #youBannedUser, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #youBannedUser, + [targetName], + ), + ), + ) as String); + + @override + String youKicked(String? targetName) => (super.noSuchMethod( + Invocation.method( + #youKicked, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #youKicked, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #youKicked, + [targetName], + ), + ), + ) as String); + + @override + String youKickedAndBanned(String? targetName) => (super.noSuchMethod( + Invocation.method( + #youKickedAndBanned, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #youKickedAndBanned, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #youKickedAndBanned, + [targetName], + ), + ), + ) as String); + + @override + String youHaveWithdrawnTheInvitationFor(String? targetName) => + (super.noSuchMethod( + Invocation.method( + #youHaveWithdrawnTheInvitationFor, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #youHaveWithdrawnTheInvitationFor, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #youHaveWithdrawnTheInvitationFor, + [targetName], + ), + ), + ) as String); + + @override + String groupWith(String? displayname) => (super.noSuchMethod( + Invocation.method( + #groupWith, + [displayname], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #groupWith, + [displayname], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #groupWith, + [displayname], + ), + ), + ) as String); + + @override + String removedBy(String? displayName) => (super.noSuchMethod( + Invocation.method( + #removedBy, + [displayName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #removedBy, + [displayName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #removedBy, + [displayName], + ), + ), + ) as String); + + @override + String sentASticker(String? senderName) => (super.noSuchMethod( + Invocation.method( + #sentASticker, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #sentASticker, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #sentASticker, + [senderName], + ), + ), + ) as String); + + @override + String redactedAnEvent(String? displayName) => (super.noSuchMethod( + Invocation.method( + #redactedAnEvent, + [displayName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #redactedAnEvent, + [displayName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #redactedAnEvent, + [displayName], + ), + ), + ) as String); + + @override + String changedTheRoomAliases(String? senderName) => (super.noSuchMethod( + Invocation.method( + #changedTheRoomAliases, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheRoomAliases, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheRoomAliases, + [senderName], + ), + ), + ) as String); + + @override + String changedTheRoomInvitationLink(String? senderName) => + (super.noSuchMethod( + Invocation.method( + #changedTheRoomInvitationLink, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheRoomInvitationLink, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheRoomInvitationLink, + [senderName], + ), + ), + ) as String); + + @override + String createdTheChat(String? senderName) => (super.noSuchMethod( + Invocation.method( + #createdTheChat, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #createdTheChat, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #createdTheChat, + [senderName], + ), + ), + ) as String); + + @override + String changedTheJoinRules(String? senderName) => (super.noSuchMethod( + Invocation.method( + #changedTheJoinRules, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheJoinRules, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheJoinRules, + [senderName], + ), + ), + ) as String); + + @override + String changedTheJoinRulesTo( + String? senderName, + String? localizedString, + ) => + (super.noSuchMethod( + Invocation.method( + #changedTheJoinRulesTo, + [ + senderName, + localizedString, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheJoinRulesTo, + [ + senderName, + localizedString, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheJoinRulesTo, + [ + senderName, + localizedString, + ], + ), + ), + ) as String); + + @override + String acceptedTheInvitation(String? targetName) => (super.noSuchMethod( + Invocation.method( + #acceptedTheInvitation, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #acceptedTheInvitation, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #acceptedTheInvitation, + [targetName], + ), + ), + ) as String); + + @override + String rejectedTheInvitation(String? targetName) => (super.noSuchMethod( + Invocation.method( + #rejectedTheInvitation, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #rejectedTheInvitation, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #rejectedTheInvitation, + [targetName], + ), + ), + ) as String); + + @override + String hasWithdrawnTheInvitationFor( + String? senderName, + String? targetName, + ) => + (super.noSuchMethod( + Invocation.method( + #hasWithdrawnTheInvitationFor, + [ + senderName, + targetName, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #hasWithdrawnTheInvitationFor, + [ + senderName, + targetName, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #hasWithdrawnTheInvitationFor, + [ + senderName, + targetName, + ], + ), + ), + ) as String); + + @override + String joinedTheChat(String? targetName) => (super.noSuchMethod( + Invocation.method( + #joinedTheChat, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #joinedTheChat, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #joinedTheChat, + [targetName], + ), + ), + ) as String); + + @override + String kickedAndBanned( + String? senderName, + String? targetName, + ) => + (super.noSuchMethod( + Invocation.method( + #kickedAndBanned, + [ + senderName, + targetName, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #kickedAndBanned, + [ + senderName, + targetName, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #kickedAndBanned, + [ + senderName, + targetName, + ], + ), + ), + ) as String); + + @override + String kicked( + String? senderName, + String? targetName, + ) => + (super.noSuchMethod( + Invocation.method( + #kicked, + [ + senderName, + targetName, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #kicked, + [ + senderName, + targetName, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #kicked, + [ + senderName, + targetName, + ], + ), + ), + ) as String); + + @override + String userLeftTheChat(String? targetName) => (super.noSuchMethod( + Invocation.method( + #userLeftTheChat, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #userLeftTheChat, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #userLeftTheChat, + [targetName], + ), + ), + ) as String); + + @override + String bannedUser( + String? senderName, + String? targetName, + ) => + (super.noSuchMethod( + Invocation.method( + #bannedUser, + [ + senderName, + targetName, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #bannedUser, + [ + senderName, + targetName, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #bannedUser, + [ + senderName, + targetName, + ], + ), + ), + ) as String); + + @override + String unbannedUser( + String? senderName, + String? targetName, + ) => + (super.noSuchMethod( + Invocation.method( + #unbannedUser, + [ + senderName, + targetName, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #unbannedUser, + [ + senderName, + targetName, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #unbannedUser, + [ + senderName, + targetName, + ], + ), + ), + ) as String); + + @override + String invitedUser( + String? senderName, + String? targetName, + ) => + (super.noSuchMethod( + Invocation.method( + #invitedUser, + [ + senderName, + targetName, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #invitedUser, + [ + senderName, + targetName, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #invitedUser, + [ + senderName, + targetName, + ], + ), + ), + ) as String); + + @override + String changedTheProfileAvatar(String? targetName) => (super.noSuchMethod( + Invocation.method( + #changedTheProfileAvatar, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheProfileAvatar, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheProfileAvatar, + [targetName], + ), + ), + ) as String); + + @override + String changedTheDisplaynameTo( + String? targetName, + String? newDisplayname, + ) => + (super.noSuchMethod( + Invocation.method( + #changedTheDisplaynameTo, + [ + targetName, + newDisplayname, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheDisplaynameTo, + [ + targetName, + newDisplayname, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheDisplaynameTo, + [ + targetName, + newDisplayname, + ], + ), + ), + ) as String); + + @override + String changedTheChatPermissions(String? senderName) => (super.noSuchMethod( + Invocation.method( + #changedTheChatPermissions, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheChatPermissions, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheChatPermissions, + [senderName], + ), + ), + ) as String); + + @override + String changedTheChatNameTo( + String? senderName, + String? content, + ) => + (super.noSuchMethod( + Invocation.method( + #changedTheChatNameTo, + [ + senderName, + content, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheChatNameTo, + [ + senderName, + content, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheChatNameTo, + [ + senderName, + content, + ], + ), + ), + ) as String); + + @override + String changedTheChatDescriptionTo( + String? senderName, + String? content, + ) => + (super.noSuchMethod( + Invocation.method( + #changedTheChatDescriptionTo, + [ + senderName, + content, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheChatDescriptionTo, + [ + senderName, + content, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheChatDescriptionTo, + [ + senderName, + content, + ], + ), + ), + ) as String); + + @override + String changedTheChatAvatar(String? senderName) => (super.noSuchMethod( + Invocation.method( + #changedTheChatAvatar, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheChatAvatar, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheChatAvatar, + [senderName], + ), + ), + ) as String); + + @override + String changedTheGuestAccessRules(String? senderName) => (super.noSuchMethod( + Invocation.method( + #changedTheGuestAccessRules, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheGuestAccessRules, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheGuestAccessRules, + [senderName], + ), + ), + ) as String); + + @override + String changedTheGuestAccessRulesTo( + String? senderName, + String? localizedString, + ) => + (super.noSuchMethod( + Invocation.method( + #changedTheGuestAccessRulesTo, + [ + senderName, + localizedString, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheGuestAccessRulesTo, + [ + senderName, + localizedString, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheGuestAccessRulesTo, + [ + senderName, + localizedString, + ], + ), + ), + ) as String); + + @override + String changedTheHistoryVisibility(String? senderName) => (super.noSuchMethod( + Invocation.method( + #changedTheHistoryVisibility, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheHistoryVisibility, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheHistoryVisibility, + [senderName], + ), + ), + ) as String); + + @override + String changedTheHistoryVisibilityTo( + String? senderName, + String? localizedString, + ) => + (super.noSuchMethod( + Invocation.method( + #changedTheHistoryVisibilityTo, + [ + senderName, + localizedString, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #changedTheHistoryVisibilityTo, + [ + senderName, + localizedString, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #changedTheHistoryVisibilityTo, + [ + senderName, + localizedString, + ], + ), + ), + ) as String); + + @override + String activatedEndToEndEncryption(String? senderName) => (super.noSuchMethod( + Invocation.method( + #activatedEndToEndEncryption, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #activatedEndToEndEncryption, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #activatedEndToEndEncryption, + [senderName], + ), + ), + ) as String); + + @override + String sentAPicture(String? senderName) => (super.noSuchMethod( + Invocation.method( + #sentAPicture, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #sentAPicture, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #sentAPicture, + [senderName], + ), + ), + ) as String); + + @override + String sentAFile(String? senderName) => (super.noSuchMethod( + Invocation.method( + #sentAFile, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #sentAFile, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #sentAFile, + [senderName], + ), + ), + ) as String); + + @override + String sentAnAudio(String? senderName) => (super.noSuchMethod( + Invocation.method( + #sentAnAudio, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #sentAnAudio, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #sentAnAudio, + [senderName], + ), + ), + ) as String); + + @override + String sentAVideo(String? senderName) => (super.noSuchMethod( + Invocation.method( + #sentAVideo, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #sentAVideo, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #sentAVideo, + [senderName], + ), + ), + ) as String); + + @override + String sentReaction( + String? senderName, + String? reactionKey, + ) => + (super.noSuchMethod( + Invocation.method( + #sentReaction, + [ + senderName, + reactionKey, + ], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #sentReaction, + [ + senderName, + reactionKey, + ], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #sentReaction, + [ + senderName, + reactionKey, + ], + ), + ), + ) as String); + + @override + String sharedTheLocation(String? senderName) => (super.noSuchMethod( + Invocation.method( + #sharedTheLocation, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #sharedTheLocation, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #sharedTheLocation, + [senderName], + ), + ), + ) as String); + + @override + String couldNotDecryptMessage(String? errorText) => (super.noSuchMethod( + Invocation.method( + #couldNotDecryptMessage, + [errorText], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #couldNotDecryptMessage, + [errorText], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #couldNotDecryptMessage, + [errorText], + ), + ), + ) as String); + + @override + String unknownEvent(String? typeKey) => (super.noSuchMethod( + Invocation.method( + #unknownEvent, + [typeKey], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #unknownEvent, + [typeKey], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #unknownEvent, + [typeKey], + ), + ), + ) as String); + + @override + String startedACall(String? senderName) => (super.noSuchMethod( + Invocation.method( + #startedACall, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #startedACall, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #startedACall, + [senderName], + ), + ), + ) as String); + + @override + String endedTheCall(String? senderName) => (super.noSuchMethod( + Invocation.method( + #endedTheCall, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #endedTheCall, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #endedTheCall, + [senderName], + ), + ), + ) as String); + + @override + String answeredTheCall(String? senderName) => (super.noSuchMethod( + Invocation.method( + #answeredTheCall, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #answeredTheCall, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #answeredTheCall, + [senderName], + ), + ), + ) as String); + + @override + String sentCallInformations(String? senderName) => (super.noSuchMethod( + Invocation.method( + #sentCallInformations, + [senderName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #sentCallInformations, + [senderName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #sentCallInformations, + [senderName], + ), + ), + ) as String); + + @override + String wasDirectChatDisplayName(String? oldDisplayName) => + (super.noSuchMethod( + Invocation.method( + #wasDirectChatDisplayName, + [oldDisplayName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #wasDirectChatDisplayName, + [oldDisplayName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #wasDirectChatDisplayName, + [oldDisplayName], + ), + ), + ) as String); + + @override + String hasKnocked(String? targetName) => (super.noSuchMethod( + Invocation.method( + #hasKnocked, + [targetName], + ), + returnValue: _i10.dummyValue( + this, + Invocation.method( + #hasKnocked, + [targetName], + ), + ), + returnValueForMissingStub: _i10.dummyValue( + this, + Invocation.method( + #hasKnocked, + [targetName], + ), + ), + ) as String); +} + +/// A class which mocks [ContactsViewControllerMixin]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockContactsViewControllerMixin extends _i1.Mock + implements _i12.ContactsViewControllerMixin { + @override + _i7.TextEditingController get textEditingController => (super.noSuchMethod( + Invocation.getter(#textEditingController), + returnValue: _FakeTextEditingController_57( + this, + Invocation.getter(#textEditingController), + ), + returnValueForMissingStub: _FakeTextEditingController_57( + this, + Invocation.getter(#textEditingController), + ), + ) as _i7.TextEditingController); + + @override + _i7.ValueNotifier<_i13.WarningContactsBannerState> + get warningBannerNotifier => (super.noSuchMethod( + Invocation.getter(#warningBannerNotifier), + returnValue: _FakeValueNotifier_58<_i13.WarningContactsBannerState>( + this, + Invocation.getter(#warningBannerNotifier), + ), + returnValueForMissingStub: + _FakeValueNotifier_58<_i13.WarningContactsBannerState>( + this, + Invocation.getter(#warningBannerNotifier), + ), + ) as _i7.ValueNotifier<_i13.WarningContactsBannerState>); + + @override + set warningBannerNotifier( + _i7.ValueNotifier<_i13.WarningContactsBannerState>? + _warningBannerNotifier) => + super.noSuchMethod( + Invocation.setter( + #warningBannerNotifier, + _warningBannerNotifier, + ), + returnValueForMissingStub: null, + ); + + @override + _i7.ValueNotifier get isSearchModeNotifier => (super.noSuchMethod( + Invocation.getter(#isSearchModeNotifier), + returnValue: _FakeValueNotifier_58( + this, + Invocation.getter(#isSearchModeNotifier), + ), + returnValueForMissingStub: _FakeValueNotifier_58( + this, + Invocation.getter(#isSearchModeNotifier), + ), + ) as _i7.ValueNotifier); + + @override + _i7.ValueNotifier> + get presentationRecentContactNotifier => (super.noSuchMethod( + Invocation.getter(#presentationRecentContactNotifier), + returnValue: _FakeValueNotifier_58>( + this, + Invocation.getter(#presentationRecentContactNotifier), + ), + returnValueForMissingStub: + _FakeValueNotifier_58>( + this, + Invocation.getter(#presentationRecentContactNotifier), + ), + ) as _i7.ValueNotifier>); + + @override + _i7.ValueNotifier<_i15.Either<_i16.Failure, _i17.Success>> + get presentationContactNotifier => (super.noSuchMethod( + Invocation.getter(#presentationContactNotifier), + returnValue: + _FakeValueNotifier_58<_i15.Either<_i16.Failure, _i17.Success>>( + this, + Invocation.getter(#presentationContactNotifier), + ), + returnValueForMissingStub: + _FakeValueNotifier_58<_i15.Either<_i16.Failure, _i17.Success>>( + this, + Invocation.getter(#presentationContactNotifier), + ), + ) as _i7.ValueNotifier<_i15.Either<_i16.Failure, _i17.Success>>); + + @override + _i7.ValueNotifier<_i15.Either<_i16.Failure, _i17.Success>> + get presentationPhonebookContactNotifier => (super.noSuchMethod( + Invocation.getter(#presentationPhonebookContactNotifier), + returnValue: + _FakeValueNotifier_58<_i15.Either<_i16.Failure, _i17.Success>>( + this, + Invocation.getter(#presentationPhonebookContactNotifier), + ), + returnValueForMissingStub: + _FakeValueNotifier_58<_i15.Either<_i16.Failure, _i17.Success>>( + this, + Invocation.getter(#presentationPhonebookContactNotifier), + ), + ) as _i7.ValueNotifier<_i15.Either<_i16.Failure, _i17.Success>>); + + @override + _i7.FocusNode get searchFocusNode => (super.noSuchMethod( + Invocation.getter(#searchFocusNode), + returnValue: _FakeFocusNode_59( + this, + Invocation.getter(#searchFocusNode), + ), + returnValueForMissingStub: _FakeFocusNode_59( + this, + Invocation.getter(#searchFocusNode), + ), + ) as _i7.FocusNode); + + @override + _i8.ContactsManager get contactsManager => (super.noSuchMethod( + Invocation.getter(#contactsManager), + returnValue: _FakeContactsManager_60( + this, + Invocation.getter(#contactsManager), + ), + returnValueForMissingStub: _FakeContactsManager_60( + this, + Invocation.getter(#contactsManager), + ), + ) as _i8.ContactsManager); + + @override + _i18.PermissionStatus get contactsPermissionStatus => (super.noSuchMethod( + Invocation.getter(#contactsPermissionStatus), + returnValue: _i18.PermissionStatus.denied, + returnValueForMissingStub: _i18.PermissionStatus.denied, + ) as _i18.PermissionStatus); + + @override + set contactsPermissionStatus( + _i18.PermissionStatus? _contactsPermissionStatus) => + super.noSuchMethod( + Invocation.setter( + #contactsPermissionStatus, + _contactsPermissionStatus, + ), + returnValueForMissingStub: null, + ); + + @override + void initialFetchContacts({ + required _i2.Client? client, + required _i2.MatrixLocalizations? matrixLocalizations, + }) => + super.noSuchMethod( + Invocation.method( + #initialFetchContacts, + [], + { + #client: client, + #matrixLocalizations: matrixLocalizations, + }, + ), + returnValueForMissingStub: null, + ); + + @override + void openSearchBar() => super.noSuchMethod( + Invocation.method( + #openSearchBar, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void onSelectedContact() => super.noSuchMethod( + Invocation.method( + #onSelectedContact, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void closeSearchBar() => super.noSuchMethod( + Invocation.method( + #closeSearchBar, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void closeContactsWarningBanner() => super.noSuchMethod( + Invocation.method( + #closeContactsWarningBanner, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void goToSettingsForPermissionActions() => super.noSuchMethod( + Invocation.method( + #goToSettingsForPermissionActions, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void disposeContactsMixin() => super.noSuchMethod( + Invocation.method( + #disposeContactsMixin, + [], + ), + returnValueForMissingStub: null, + ); +}