diff options
| author | Albin <albin@mullvad.net> | 2024-08-28 20:33:46 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2024-08-28 20:44:14 +0200 |
| commit | b52c423d777213d5bb92430bccec880c6367a70b (patch) | |
| tree | 6ce254a809c1555fbde9a1c5692725042803854c /android/app/src/test | |
| parent | a71f1e7a6888bc6af5a9df355afd26d3f56d0e5c (diff) | |
| download | mullvadvpn-b52c423d777213d5bb92430bccec880c6367a70b.tar.xz mullvadvpn-b52c423d777213d5bb92430bccec880c6367a70b.zip | |
Reformat kotlin code using updated ktfmt plugin
This commit mostly adds trailing commas throughout the project,
but also includes a few other formatting changes.
Diffstat (limited to 'android/app/src/test')
34 files changed, 135 insertions, 163 deletions
diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/InAppNotificationControllerTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/InAppNotificationControllerTest.kt index 78f1563c85..3bbdcea9cc 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/InAppNotificationControllerTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/InAppNotificationControllerTest.kt @@ -56,7 +56,7 @@ class InAppNotificationControllerTest { newDeviceNotificationUseCase, versionNotificationUseCase, tunnelStateNotificationUseCase, - CoroutineScope(job + UnconfinedTestDispatcher()) + CoroutineScope(job + UnconfinedTestDispatcher()), ) } @@ -93,7 +93,7 @@ class InAppNotificationControllerTest { accountExpiry, newDevice, ), - notifications + notifications, ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/applist/ApplicationsProviderTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/applist/ApplicationsProviderTest.kt index 62ceaa7ebe..560dafb24a 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/applist/ApplicationsProviderTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/applist/ApplicationsProviderTest.kt @@ -39,7 +39,7 @@ class ApplicationsProviderTest { createApplicationInfo( launchWithInternetPackageName, launch = true, - internet = true + internet = true, ), createApplicationInfo(launchWithoutInternetPackageName, launch = true), createApplicationInfo(nonLaunchWithInternetPackageName, internet = true), @@ -47,10 +47,10 @@ class ApplicationsProviderTest { createApplicationInfo( leanbackLaunchWithInternetPackageName, leanback = true, - internet = true + internet = true, ), createApplicationInfo(leanbackLaunchWithoutInternetPackageName, leanback = true), - createApplicationInfo(selfPackageName, internet = true, launch = true) + createApplicationInfo(selfPackageName, internet = true, launch = true), ) val result = testSubject.getAppsList() @@ -61,13 +61,13 @@ class ApplicationsProviderTest { nonLaunchWithInternetPackageName, 0, nonLaunchWithInternetPackageName, - true + true, ), AppData( leanbackLaunchWithInternetPackageName, 0, - leanbackLaunchWithInternetPackageName - ) + leanbackLaunchWithInternetPackageName, + ), ) assertLists(expected, result) @@ -82,7 +82,7 @@ class ApplicationsProviderTest { nonLaunchWithoutInternetPackageName, leanbackLaunchWithInternetPackageName, leanbackLaunchWithoutInternetPackageName, - selfPackageName + selfPackageName, ) .forEach { packageName -> mockedPackageManager.checkPermission(internet, packageName) @@ -91,16 +91,13 @@ class ApplicationsProviderTest { listOf( launchWithInternetPackageName, nonLaunchWithInternetPackageName, - leanbackLaunchWithInternetPackageName + leanbackLaunchWithInternetPackageName, ) .forEach { packageName -> mockedPackageManager.getLaunchIntentForPackage(packageName) } - listOf( - nonLaunchWithInternetPackageName, - leanbackLaunchWithInternetPackageName, - ) + listOf(nonLaunchWithInternetPackageName, leanbackLaunchWithInternetPackageName) .forEach { packageName -> mockedPackageManager.getLeanbackLaunchIntentForPackage(packageName) } @@ -112,7 +109,7 @@ class ApplicationsProviderTest { launch: Boolean = false, leanback: Boolean = false, internet: Boolean = false, - systemApp: Boolean = false + systemApp: Boolean = false, ): ApplicationInfo { val mockApplicationInfo = mockk<ApplicationInfo>() diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/ApiAccessRepositoryTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/ApiAccessRepositoryTest.kt index cb1042e6f8..9f0e9e9c68 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/ApiAccessRepositoryTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/ApiAccessRepositoryTest.kt @@ -42,7 +42,7 @@ class ApiAccessRepositoryTest { apiAccessRepository = ApiAccessRepository( managementService = mockManagementService, - dispatcher = UnconfinedTestDispatcher() + dispatcher = UnconfinedTestDispatcher(), ) } @@ -180,7 +180,7 @@ class ApiAccessRepositoryTest { name = ApiAccessMethodName.fromString("Name"), apiAccessMethod = ApiAccessMethod.Direct, enabled = true, - id = apiAccessMethodId + id = apiAccessMethodId, ) val mockSettings: Settings = mockk() every { mockSettings.apiAccessMethodSettings } returns listOf(expectedResult) @@ -220,7 +220,7 @@ class ApiAccessRepositoryTest { name = ApiAccessMethodName.fromString("Name"), apiAccessMethod = ApiAccessMethod.Direct, enabled = true, - id = apiAccessMethodId + id = apiAccessMethodId, ) val mockSettings: Settings = mockk() every { mockSettings.apiAccessMethodSettings } returns listOf(apiAccessMethodSetting) @@ -263,7 +263,7 @@ class ApiAccessRepositoryTest { name = ApiAccessMethodName.fromString("Name"), apiAccessMethod = ApiAccessMethod.Direct, enabled = true, - id = apiAccessMethodId + id = apiAccessMethodId, ) val mockSettings: Settings = mockk() every { mockSettings.apiAccessMethodSettings } returns listOf(apiAccessMethodSetting) diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/ChangelogRepositoryTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/ChangelogRepositoryTest.kt index 4df5c101a7..4929c7117b 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/ChangelogRepositoryTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/ChangelogRepositoryTest.kt @@ -25,7 +25,7 @@ class ChangelogRepositoryTest { val expectedResult = listOf( "Added very nice new feature with a very long descriptive message about how it works...", - "Fixed super bad leak." + "Fixed super bad leak.", ) every { mockDataProvider.getChangelog() } returns testChangelog diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt index 09b5f4925b..9148d45be7 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/CustomListsRepositoryTest.kt @@ -36,7 +36,7 @@ class CustomListsRepositoryTest { customListsRepository = CustomListsRepository( managementService = mockManagementService, - dispatcher = UnconfinedTestDispatcher() + dispatcher = UnconfinedTestDispatcher(), ) } @@ -49,7 +49,7 @@ class CustomListsRepositoryTest { CustomList( id = customListId, name = mockk(relaxed = true), - locations = mockk(relaxed = true) + locations = mockk(relaxed = true), ) val mockSettings: Settings = mockk() every { mockSettings.customLists } returns listOf(mockCustomList) @@ -71,7 +71,7 @@ class CustomListsRepositoryTest { CustomList( id = customListId, name = mockk(relaxed = true), - locations = mockk(relaxed = true) + locations = mockk(relaxed = true), ) val mockSettings: Settings = mockk() val otherCustomListId = CustomListId("2") @@ -126,7 +126,7 @@ class CustomListsRepositoryTest { CustomList( id = customListId, name = mockk(relaxed = true), - locations = mockk(relaxed = true) + locations = mockk(relaxed = true), ) every { mockSettings.customLists } returns listOf(mockCustomList) settingsFlow.value = mockSettings @@ -152,7 +152,7 @@ class CustomListsRepositoryTest { CustomList( id = customListId, name = CustomListName.fromString("OLD CUSTOM"), - locations = emptyList() + locations = emptyList(), ) val updatedCustomList = CustomList(id = customListId, name = customListName, locations = emptyList()) @@ -220,7 +220,7 @@ class CustomListsRepositoryTest { CustomList( id = customListId, name = CustomListName.fromString("name"), - locations = emptyList() + locations = emptyList(), ) val locationId = GeoLocationId.Country("se") every { mockSettings.customLists } returns listOf(mockCustomList) @@ -230,7 +230,7 @@ class CustomListsRepositoryTest { val result = customListsRepository.updateCustomListLocations( otherCustomListId, - listOf(locationId) + listOf(locationId), ) // Assert diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/RelayListFilterRepositoryTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/RelayListFilterRepositoryTest.kt index c8027240a2..53d2b1044d 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/RelayListFilterRepositoryTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/repository/RelayListFilterRepositoryTest.kt @@ -34,7 +34,7 @@ class RelayListFilterRepositoryTest { relayListFilterRepository = RelayListFilterRepository( managementService = mockManagementService, - dispatcher = UnconfinedTestDispatcher() + dispatcher = UnconfinedTestDispatcher(), ) } @@ -82,7 +82,7 @@ class RelayListFilterRepositoryTest { val result = relayListFilterRepository.updateSelectedOwnershipAndProviderFilter( ownership, - providers + providers, ) // Assert @@ -104,7 +104,7 @@ class RelayListFilterRepositoryTest { val result = relayListFilterRepository.updateSelectedOwnershipAndProviderFilter( ownership, - providers + providers, ) // Assert diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryNotificationUseCaseTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryNotificationUseCaseTest.kt index 897ab65e15..f8a0e52a3e 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryNotificationUseCaseTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/AccountExpiryNotificationUseCaseTest.kt @@ -56,7 +56,7 @@ class AccountExpiryNotificationUseCaseTest { assertEquals( listOf(InAppNotification.AccountExpiry(closeToExpiry.expiryDate)), - awaitItem() + awaitItem(), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/CustomListActionUseCaseTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/CustomListActionUseCaseTest.kt index 5af19ade8b..233d429bc4 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/CustomListActionUseCaseTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/CustomListActionUseCaseTest.kt @@ -35,7 +35,7 @@ class CustomListActionUseCaseTest { private val customListActionUseCase = CustomListActionUseCase( customListsRepository = mockCustomListsRepository, - relayListRepository = mockRelayListRepository + relayListRepository = mockRelayListRepository, ) private val relayListFlow = MutableStateFlow(emptyList<RelayItem.Location.Country>()) @@ -59,7 +59,7 @@ class CustomListActionUseCaseTest { id = createdId, name = name, locationNames = listOf(locationName), - undo = action.not(createdId) + undo = action.not(createdId), ) .right() coEvery { mockCustomListsRepository.createCustomList(name) } returns createdId.right() @@ -71,7 +71,7 @@ class CustomListActionUseCaseTest { RelayItem.Location.Country( id = locationId, name = locationName, - cities = emptyList() + cities = emptyList(), ) ) diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/NewDeviceNotificationUseCaseTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/NewDeviceNotificationUseCaseTest.kt index 0ed49aae7f..32cc48f2c5 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/NewDeviceNotificationUseCaseTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/NewDeviceNotificationUseCaseTest.kt @@ -35,8 +35,8 @@ class NewDeviceNotificationUseCaseTest { Device( id = DeviceId.fromString(UUID), name = deviceName, - creationDate = DateTime.now() - ) + creationDate = DateTime.now(), + ), ) ) private val isNewDeviceState = MutableStateFlow(false) @@ -57,7 +57,7 @@ class NewDeviceNotificationUseCaseTest { newDeviceNotificationUseCase = NewDeviceNotificationUseCase( newDeviceRepository = mockNewDeviceRepository, - deviceRepository = mockDeviceRepository + deviceRepository = mockDeviceRepository, ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/VersionNotificationUseCaseTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/VersionNotificationUseCaseTest.kt index 944ebc11a4..1aead39d85 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/VersionNotificationUseCaseTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/usecase/VersionNotificationUseCaseTest.kt @@ -34,7 +34,7 @@ class VersionNotificationUseCaseTest { versionNotificationUseCase = VersionNotificationUseCase( appVersionInfoRepository = mockAppVersionInfoRepository, - isVersionInfoNotificationEnabled = true + isVersionInfoNotificationEnabled = true, ) } @@ -54,18 +54,14 @@ class VersionNotificationUseCaseTest { runTest { versionNotificationUseCase().test { // Arrange, Act - val upgradeVersionInfo = - VersionInfo( - currentVersion = "1.0", - isSupported = false, - ) + val upgradeVersionInfo = VersionInfo(currentVersion = "1.0", isSupported = false) awaitItem() versionInfo.value = upgradeVersionInfo // Assert assertEquals( awaitItem(), - listOf(InAppNotification.UnsupportedVersion(upgradeVersionInfo)) + listOf(InAppNotification.UnsupportedVersion(upgradeVersionInfo)), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/utils/VoucherRegexHelperParameterizedTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/utils/VoucherRegexHelperParameterizedTest.kt index abe325ba43..5ccf28e6f6 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/utils/VoucherRegexHelperParameterizedTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/utils/VoucherRegexHelperParameterizedTest.kt @@ -34,7 +34,7 @@ class VoucherRegexHelperParameterizedTest { arrayOf(IS_ACCEPTED_FORMAT, "AAAA-AAAA-1111-2222\n"), arrayOf(IS_UNACCEPTED_FORMAT, "@"), arrayOf(IS_UNACCEPTED_FORMAT, "AAAABBBBCCCCDDDD\t"), - arrayOf(IS_UNACCEPTED_FORMAT, "AAAA_BBBB_CCCC_DDDD") + arrayOf(IS_UNACCEPTED_FORMAT, "AAAA_BBBB_CCCC_DDDD"), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/AccountViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/AccountViewModelTest.kt index d239e01331..0a9d2f36f9 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/AccountViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/AccountViewModelTest.kt @@ -43,10 +43,7 @@ class AccountViewModelTest { private val dummyDevice = Device(id = DeviceId.fromString(UUID), name = "fake_name", creationDate = DateTime.now()) - private val dummyAccountNumber: AccountNumber = - AccountNumber( - DUMMY_DEVICE_NAME, - ) + private val dummyAccountNumber: AccountNumber = AccountNumber(DUMMY_DEVICE_NAME) private val deviceState: MutableStateFlow<DeviceState?> = MutableStateFlow( @@ -72,7 +69,7 @@ class AccountViewModelTest { accountRepository = mockAccountRepository, deviceRepository = mockDeviceRepository, paymentUseCase = mockPaymentUseCase, - isPlayBuild = false + isPlayBuild = false, ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ApiAccessMethodDetailsViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ApiAccessMethodDetailsViewModelTest.kt index bd304573d3..7b355ed194 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ApiAccessMethodDetailsViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ApiAccessMethodDetailsViewModelTest.kt @@ -54,7 +54,7 @@ class ApiAccessMethodDetailsViewModelTest { apiAccessRepository = mockApiAccessRepository, savedStateHandle = ApiAccessMethodDetailsNavArgs(accessMethodId = apiAccessMethodId) - .toSavedStateHandle() + .toSavedStateHandle(), ) } @@ -183,7 +183,7 @@ class ApiAccessMethodDetailsViewModelTest { apiAccessMethodDetailsViewModel.openEditPage() assertEquals( ApiAccessMethodDetailsSideEffect.OpenEditPage(apiAccessMethodId), - awaitItem() + awaitItem(), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModelTest.kt index 855eea238d..79f97ff466 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ConnectViewModelTest.kt @@ -130,7 +130,7 @@ class ConnectViewModelTest { connectionProxy = mockConnectionProxy, lastKnownLocationUseCase = mockLastKnownLocationUseCase, vpnPermissionRepository = mockVpnPermissionRepository, - isPlayBuild = false + isPlayBuild = false, ) } @@ -200,7 +200,7 @@ class ConnectViewModelTest { city = "Gothenburg", hostname = "Host", latitude = 57.7065, - longitude = 11.967 + longitude = 11.967, ) // Act, Assert diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CreateCustomListDialogViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CreateCustomListDialogViewModelTest.kt index fee63ae804..bcc6f6ff95 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CreateCustomListDialogViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CreateCustomListDialogViewModelTest.kt @@ -42,7 +42,7 @@ class CreateCustomListDialogViewModelTest { CustomListActionResultData.Success.CreatedWithLocations( customListName = customListName, locationNames = locationNames, - undo = mockUndo + undo = mockUndo, ) val viewModel = createViewModelWithLocationCode(GeoLocationId.Country("AB")) coEvery { mockCustomListActionUseCase(any<CustomListAction.Create>()) } returns @@ -72,7 +72,7 @@ class CreateCustomListDialogViewModelTest { id = createdId, name = customListName, locationNames = emptyList(), - undo = CustomListAction.Delete(createdId) + undo = CustomListAction.Delete(createdId), ) val viewModel = createViewModelWithLocationCode(GeoLocationId.Country("AB")) coEvery { mockCustomListActionUseCase(any<CustomListAction.Create>()) } returns @@ -130,9 +130,6 @@ class CreateCustomListDialogViewModelTest { CreateCustomListDialogViewModel( customListActionUseCase = mockCustomListActionUseCase, savedStateHandle = - CreateCustomListNavArgs( - locationCode = locationCode, - ) - .toSavedStateHandle() + CreateCustomListNavArgs(locationCode = locationCode).toSavedStateHandle(), ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModelTest.kt index f453223ec7..e4012abd9e 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListLocationsViewModelTest.kt @@ -58,7 +58,7 @@ class CustomListLocationsViewModelTest { CustomList( id = CustomListId("id"), name = CustomListName.fromString("name"), - locations = emptyList() + locations = emptyList(), ) val viewModel = createViewModel(customListId = customList.id, newList = newList) @@ -76,7 +76,7 @@ class CustomListLocationsViewModelTest { item = it, depth = it.toDepth(), checked = false, - expanded = false + expanded = false, ) } val customListId = CustomListId("id") @@ -250,7 +250,7 @@ class CustomListLocationsViewModelTest { val expectedResult = CustomListActionResultData.Success.LocationChanged( customListName = customListName, - undo = mockUndo + undo = mockUndo, ) coEvery { mockCustomListUseCase(any<CustomListAction.UpdateLocations>()) } returns locationsChangedMock.right() @@ -272,18 +272,15 @@ class CustomListLocationsViewModelTest { private fun createViewModel( customListId: CustomListId, - newList: Boolean + newList: Boolean, ): CustomListLocationsViewModel { return CustomListLocationsViewModel( relayListRepository = mockRelayListRepository, customListRelayItemsUseCase = mockCustomListRelayItemsUseCase, customListActionUseCase = mockCustomListUseCase, savedStateHandle = - CustomListLocationsNavArgs( - customListId = customListId, - newList = newList, - ) - .toSavedStateHandle() + CustomListLocationsNavArgs(customListId = customListId, newList = newList) + .toSavedStateHandle(), ) } @@ -315,20 +312,20 @@ class CustomListLocationsViewModelTest { GeoLocationId.Hostname( GeoLocationId.City( GeoLocationId.Country("SE"), - "GBG" + "GBG", ), - "gbg-1" + "gbg-1", ), active = true, provider = Provider( ProviderId("Provider"), - ownership = Ownership.MullvadOwned - ) + ownership = Ownership.MullvadOwned, + ), ) - ) + ), ) - ) + ), ) ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt index bddb36e446..50c52f74cd 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/CustomListsViewModelTest.kt @@ -49,6 +49,6 @@ class CustomListsViewModelTest { private fun createViewModel() = CustomListsViewModel( customListsRepository = mockCustomListsRepository, - customListActionUseCase = mockCustomListsActionUseCase + customListActionUseCase = mockCustomListsActionUseCase, ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeleteApiAccessMethodConfirmationViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeleteApiAccessMethodConfirmationViewModelTest.kt index eea3c01b2d..0f248a99d2 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeleteApiAccessMethodConfirmationViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeleteApiAccessMethodConfirmationViewModelTest.kt @@ -34,7 +34,7 @@ class DeleteApiAccessMethodConfirmationViewModelTest { apiAccessRepository = mockApiAccessRepository, savedStateHandle = DeleteApiAccessMethodNavArgs(apiAccessMethodId = apiAccessMethodId) - .toSavedStateHandle() + .toSavedStateHandle(), ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeleteCustomListConfirmationViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeleteCustomListConfirmationViewModelTest.kt index d90deeb99e..2a6263e980 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeleteCustomListConfirmationViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeleteCustomListConfirmationViewModelTest.kt @@ -53,8 +53,8 @@ class DeleteCustomListConfirmationViewModelTest { savedStateHandle = DeleteCustomListNavArgs( customListId = CustomListId("1"), - name = CustomListName.fromString("asdf") + name = CustomListName.fromString("asdf"), ) - .toSavedStateHandle() + .toSavedStateHandle(), ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeviceRevokedViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeviceRevokedViewModelTest.kt index 51ea31540c..4fb6047066 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeviceRevokedViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/DeviceRevokedViewModelTest.kt @@ -43,7 +43,7 @@ class DeviceRevokedViewModelTest { DeviceRevokedViewModel( accountRepository = mockedAccountRepository, connectionProxy = mockConnectionProxy, - dispatcher = UnconfinedTestDispatcher() + dispatcher = UnconfinedTestDispatcher(), ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/EditCustomListNameDialogViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/EditCustomListNameDialogViewModelTest.kt index 83ddaec36e..47f16e2535 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/EditCustomListNameDialogViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/EditCustomListNameDialogViewModelTest.kt @@ -96,6 +96,6 @@ class EditCustomListNameDialogViewModelTest { customListId = customListId, initialName = CustomListName.fromString(initialName), ) - .toSavedStateHandle() + .toSavedStateHandle(), ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/EditCustomListViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/EditCustomListViewModelTest.kt index 16d1488bc4..5d0ecff5df 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/EditCustomListViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/EditCustomListViewModelTest.kt @@ -62,6 +62,6 @@ class EditCustomListViewModelTest { customListsRepository = mockCustomListsRepository, savedStateHandle = EditCustomListNameNavArgs(customListId = customListId, initialName = initialName) - .toSavedStateHandle() + .toSavedStateHandle(), ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/FilterViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/FilterViewModelTest.kt index dc83223394..4453f08ee4 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/FilterViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/FilterViewModelTest.kt @@ -54,13 +54,13 @@ class FilterViewModelTest { Provider(ProviderId("Quadranet"), Ownership.Rented), Provider(ProviderId("techfutures"), Ownership.Rented), Provider(ProviderId("Tzulo"), Ownership.Rented), - Provider(ProviderId("xtom"), Ownership.Rented) + Provider(ProviderId("xtom"), Ownership.Rented), ) private val mockSelectedProviders: List<Provider> = listOf( Provider(ProviderId("31173"), Ownership.MullvadOwned), Provider(ProviderId("Blix"), Ownership.MullvadOwned), - Provider(ProviderId("Creanova"), Ownership.MullvadOwned) + Provider(ProviderId("Creanova"), Ownership.MullvadOwned), ) @BeforeEach @@ -74,7 +74,7 @@ class FilterViewModelTest { viewModel = FilterViewModel( availableProvidersUseCase = mockAvailableProvidersUseCase, - relayListFilterRepository = mockRelayListFilterRepository + relayListFilterRepository = mockRelayListFilterRepository, ) } @@ -108,7 +108,7 @@ class FilterViewModelTest { viewModel.setSelectedProvider(true, mockSelectedProvidersList) assertLists( listOf(mockSelectedProvidersList) + mockSelectedProviders, - awaitItem().selectedProviders + awaitItem().selectedProviders, ) } } @@ -137,7 +137,7 @@ class FilterViewModelTest { coEvery { mockRelayListFilterRepository.updateSelectedOwnershipAndProviderFilter( mockOwnership, - mockSelectedProviders + mockSelectedProviders, ) } returns Unit.right() @@ -148,7 +148,7 @@ class FilterViewModelTest { coVerify { mockRelayListFilterRepository.updateSelectedOwnershipAndProviderFilter( mockOwnership, - mockSelectedProviders + mockSelectedProviders, ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModelTest.kt index a9905e9506..a01554befc 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/LoginViewModelTest.kt @@ -54,7 +54,7 @@ class LoginViewModelTest { accountRepository = mockedAccountRepository, newDeviceRepository = mockk(relaxUnitFun = true), internetAvailableUseCase = connectivityUseCase, - UnconfinedTestDispatcher() + UnconfinedTestDispatcher(), ) } @@ -74,7 +74,7 @@ class LoginViewModelTest { // Assert assertEquals( Idle(loginError = LoginError.NoInternetConnection), - uiStates.awaitItem().loginState + uiStates.awaitItem().loginState, ) } } @@ -151,7 +151,7 @@ class LoginViewModelTest { assertEquals(Idle(null), uiStates.awaitItem().loginState) assertEquals( LoginUiSideEffect.TooManyDevices(DUMMY_ACCOUNT_NUMBER), - sideEffects.awaitItem() + sideEffects.awaitItem(), ) } } @@ -169,7 +169,7 @@ class LoginViewModelTest { assertEquals(Loading.LoggingIn, awaitItem().loginState) assertEquals( Idle(LoginError.Unknown(EXPECTED_RPC_ERROR_MESSAGE)), - awaitItem().loginState + awaitItem().loginState, ) } } @@ -201,7 +201,7 @@ class LoginViewModelTest { loginViewModel.uiState.test { assertEquals( LoginUiState.INITIAL.copy(lastUsedAccount = DUMMY_ACCOUNT_NUMBER), - awaitItem() + awaitItem(), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/OutOfTimeViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/OutOfTimeViewModelTest.kt index 047369b5cb..6c1ff9e1a2 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/OutOfTimeViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/OutOfTimeViewModelTest.kt @@ -89,7 +89,7 @@ class OutOfTimeViewModelTest { outOfTimeUseCase = mockOutOfTimeUseCase, connectionProxy = mockConnectionProxy, pollAccountExpiry = false, - isPlayBuild = false + isPlayBuild = false, ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ReportProblemViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ReportProblemViewModelTest.kt index 80cb2d5e58..fa5ec10b5c 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ReportProblemViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ReportProblemViewModelTest.kt @@ -59,7 +59,7 @@ class ReportProblemViewModelTest { assertEquals(SendingReportUiState.Sending, awaitItem().sendingState) assertEquals( SendingReportUiState.Error(SendProblemReportResult.Error.CollectLog), - awaitItem().sendingState + awaitItem().sendingState, ) } } @@ -79,7 +79,7 @@ class ReportProblemViewModelTest { assertEquals(SendingReportUiState.Sending, awaitItem().sendingState) assertEquals( SendingReportUiState.Error(SendProblemReportResult.Error.SendReport), - awaitItem().sendingState + awaitItem().sendingState, ) } } @@ -107,15 +107,11 @@ class ReportProblemViewModelTest { viewModel.sendReport(email, description, true) assertEquals( ReportProblemUiState(SendingReportUiState.Sending, email, description), - awaitItem() + awaitItem(), ) assertEquals( - ReportProblemUiState( - SendingReportUiState.Success(null), - "", - "", - ), - awaitItem() + ReportProblemUiState(SendingReportUiState.Success(null), "", ""), + awaitItem(), ) } } @@ -154,20 +150,12 @@ class ReportProblemViewModelTest { viewModel.sendReport(email, description) assertEquals( - ReportProblemUiState( - SendingReportUiState.Sending, - email, - description, - ), - awaitItem() + ReportProblemUiState(SendingReportUiState.Sending, email, description), + awaitItem(), ) assertEquals( - ReportProblemUiState( - SendingReportUiState.Success(email), - "", - "", - ), - awaitItem() + ReportProblemUiState(SendingReportUiState.Success(email), "", ""), + awaitItem(), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ResetServerIpOverridesConfirmationViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ResetServerIpOverridesConfirmationViewModelTest.kt index 17394c39db..3b166f098c 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ResetServerIpOverridesConfirmationViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ResetServerIpOverridesConfirmationViewModelTest.kt @@ -32,7 +32,7 @@ class ResetServerIpOverridesConfirmationViewModelTest { viewModel = ResetServerIpOverridesConfirmationViewModel( - relayOverridesRepository = mockRelayOverridesRepository, + relayOverridesRepository = mockRelayOverridesRepository ) } @@ -49,7 +49,7 @@ class ResetServerIpOverridesConfirmationViewModelTest { viewModel.clearAllOverrides() assertEquals( ResetServerIpOverridesConfirmationUiSideEffect.OverridesCleared, - awaitItem() + awaitItem(), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SaveApiAccessMethodViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SaveApiAccessMethodViewModelTest.kt index 3455bba423..f02447ba8f 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SaveApiAccessMethodViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SaveApiAccessMethodViewModelTest.kt @@ -43,13 +43,13 @@ class SaveApiAccessMethodViewModelTest { mockApiAccessRepository.updateApiAccessMethod( apiAccessMethodId, apiAccessMethodName, - customProxy + customProxy, ) } returns Unit.right() createSaveApiAccessMethodViewModel( apiAccessMethodId = apiAccessMethodId, apiAccessMethodName = apiAccessMethodName, - customProxy = customProxy + customProxy = customProxy, ) // Act, Assert @@ -58,16 +58,16 @@ class SaveApiAccessMethodViewModelTest { assertEquals( SaveApiAccessMethodUiState( testingState = TestApiAccessMethodState.Result.Successful, - isSaving = true + isSaving = true, ), - awaitItem() + awaitItem(), ) } saveApiAccessMethodViewModel.uiSideEffect.test { // Check for successful creation assertEquals( SaveApiAccessMethodSideEffect.SuccessfullyCreatedApiMethod, - awaitItem() + awaitItem(), ) } } @@ -83,7 +83,7 @@ class SaveApiAccessMethodViewModelTest { createSaveApiAccessMethodViewModel( apiAccessMethodId = apiAccessMethodId, apiAccessMethodName = apiAccessMethodName, - customProxy = customProxy + customProxy = customProxy, ) // Act, Assert @@ -91,9 +91,9 @@ class SaveApiAccessMethodViewModelTest { assertEquals( SaveApiAccessMethodUiState( testingState = TestApiAccessMethodState.Result.Failure, - isSaving = false + isSaving = false, ), - awaitItem() + awaitItem(), ) } } @@ -110,13 +110,13 @@ class SaveApiAccessMethodViewModelTest { mockApiAccessRepository.updateApiAccessMethod( apiAccessMethodId, apiAccessMethodName, - customProxy + customProxy, ) } returns Unit.right() createSaveApiAccessMethodViewModel( apiAccessMethodId = apiAccessMethodId, apiAccessMethodName = apiAccessMethodName, - customProxy = customProxy + customProxy = customProxy, ) // Act, Assert @@ -125,18 +125,18 @@ class SaveApiAccessMethodViewModelTest { assertEquals( SaveApiAccessMethodUiState( testingState = TestApiAccessMethodState.Result.Failure, - isSaving = false + isSaving = false, ), - awaitItem() + awaitItem(), ) saveApiAccessMethodViewModel.save() // Saving assertEquals( SaveApiAccessMethodUiState( testingState = TestApiAccessMethodState.Result.Failure, - isSaving = true + isSaving = true, ), - awaitItem() + awaitItem(), ) } saveApiAccessMethodViewModel.uiSideEffect.test { @@ -157,13 +157,13 @@ class SaveApiAccessMethodViewModelTest { mockApiAccessRepository.updateApiAccessMethod( apiAccessMethodId, apiAccessMethodName, - customProxy + customProxy, ) } returns UnknownApiAccessMethodError(Throwable()).left() createSaveApiAccessMethodViewModel( apiAccessMethodId = apiAccessMethodId, apiAccessMethodName = apiAccessMethodName, - customProxy = customProxy + customProxy = customProxy, ) // Act, Assert @@ -185,14 +185,14 @@ class SaveApiAccessMethodViewModelTest { NewAccessMethodSetting( name = apiAccessMethodName, enabled = true, - apiAccessMethod = customProxy + apiAccessMethod = customProxy, ) ) } returns ApiAccessMethodId.fromString(UUID).right() createSaveApiAccessMethodViewModel( apiAccessMethodId = apiAccessMethodId, apiAccessMethodName = apiAccessMethodName, - customProxy = customProxy + customProxy = customProxy, ) // Assert @@ -201,7 +201,7 @@ class SaveApiAccessMethodViewModelTest { NewAccessMethodSetting( name = apiAccessMethodName, enabled = true, - apiAccessMethod = customProxy + apiAccessMethod = customProxy, ) ) } @@ -210,7 +210,7 @@ class SaveApiAccessMethodViewModelTest { private fun createSaveApiAccessMethodViewModel( apiAccessMethodId: ApiAccessMethodId?, apiAccessMethodName: ApiAccessMethodName, - customProxy: ApiAccessMethod.CustomProxy + customProxy: ApiAccessMethod.CustomProxy, ) { saveApiAccessMethodViewModel = SaveApiAccessMethodViewModel( @@ -221,7 +221,7 @@ class SaveApiAccessMethodViewModelTest { name = apiAccessMethodName, customProxy = customProxy, ) - .toSavedStateHandle() + .toSavedStateHandle(), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SelectLocationViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SelectLocationViewModelTest.kt index 993190ba2c..5a44f6db06 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SelectLocationViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SelectLocationViewModelTest.kt @@ -120,7 +120,7 @@ class SelectLocationViewModelTest { assertIs<SelectLocationUiState.Content>(actualState) assertLists( testCountries.map { it.id }, - actualState.relayListItems.mapNotNull { it.relayItemId() } + actualState.relayListItems.mapNotNull { it.relayItemId() }, ) assertTrue( actualState.relayListItems @@ -143,7 +143,7 @@ class SelectLocationViewModelTest { assertIs<SelectLocationUiState.Content>(actualState) assertLists( testCountries.map { it.id }, - actualState.relayListItems.mapNotNull { it.relayItemId() } + actualState.relayListItems.mapNotNull { it.relayItemId() }, ) assertTrue( actualState.relayListItems.filterIsInstance<RelayListItem.SelectableItem>().all { @@ -224,7 +224,7 @@ class SelectLocationViewModelTest { assertIs<SelectLocationUiState.Content>(actualState) assertEquals( listOf(RelayListItem.LocationsEmptyText(mockSearchString)), - actualState.relayListItems + actualState.relayListItems, ) } } @@ -288,7 +288,7 @@ class SelectLocationViewModelTest { CustomList( id = CustomListId("1"), name = customListName, - locations = emptyList() + locations = emptyList(), ), locations = emptyList(), ) @@ -296,7 +296,7 @@ class SelectLocationViewModelTest { CustomListActionResultData.Success.LocationAdded( customListName = customListName, locationName = location.name, - undo = CustomListAction.UpdateLocations(id = customListId, locations = emptyList()) + undo = CustomListAction.UpdateLocations(id = customListId, locations = emptyList()), ) coEvery { mockCustomListActionUseCase(any<CustomListAction.UpdateLocations>()) } returns @@ -304,7 +304,7 @@ class SelectLocationViewModelTest { id = customListId, name = customListName, locations = listOf(addedLocationsId), - oldLocations = emptyList() + oldLocations = emptyList(), ) .right() @@ -337,8 +337,8 @@ class SelectLocationViewModelTest { undo = CustomListAction.UpdateLocations( id = customListId, - locations = listOf(location.id) - ) + locations = listOf(location.id), + ), ) coEvery { mockCustomListActionUseCase(any<CustomListAction.UpdateLocations>()) } returns LocationsChanged( @@ -352,7 +352,7 @@ class SelectLocationViewModelTest { CustomList( id = customListId, name = customListName, - locations = listOf(removedLocationsId) + locations = listOf(removedLocationsId), ) .right() @@ -393,11 +393,11 @@ class SelectLocationViewModelTest { RelayItem.Location.City( id = GeoLocationId.City(GeoLocationId.Country("se"), "got"), "Gothenburg", - emptyList() + emptyList(), ) - ) + ), ), - RelayItem.Location.Country(id = GeoLocationId.Country("no"), "Norway", emptyList()) + RelayItem.Location.Country(id = GeoLocationId.Country("no"), "Norway", emptyList()), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ServerIpOverridesViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ServerIpOverridesViewModelTest.kt index b39d4357de..6203d54b63 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ServerIpOverridesViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/ServerIpOverridesViewModelTest.kt @@ -45,7 +45,7 @@ class ServerIpOverridesViewModelTest { viewModel = ServerIpOverridesViewModel( relayOverridesRepository = mockRelayOverridesRepository, - contentResolver = mockContentResolver + contentResolver = mockContentResolver, ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SettingsViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SettingsViewModelTest.kt index 416dd7c1a9..97259b8b43 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SettingsViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SettingsViewModelTest.kt @@ -41,7 +41,7 @@ class SettingsViewModelTest { SettingsViewModel( deviceRepository = mockDeviceRepository, appVersionInfoRepository = mockAppVersionInfoRepository, - isPlayBuild = false + isPlayBuild = false, ) } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SplitTunnelingViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SplitTunnelingViewModelTest.kt index aa1ccc82f0..00fd6e752c 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SplitTunnelingViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/SplitTunnelingViewModelTest.kt @@ -70,7 +70,7 @@ class SplitTunnelingViewModelTest { enabled = true, excludedApps = emptyList(), includedApps = emptyList(), - showSystemApps = false + showSystemApps = false, ) testSubject.uiState.test { assertEquals(expectedState, awaitItem()) } } @@ -88,7 +88,7 @@ class SplitTunnelingViewModelTest { enabled = true, excludedApps = listOf(appExcluded), includedApps = listOf(appNotExcluded), - showSystemApps = false + showSystemApps = false, ) testSubject.uiState.test { @@ -109,14 +109,14 @@ class SplitTunnelingViewModelTest { enabled = true, excludedApps = listOf(app), includedApps = emptyList(), - showSystemApps = false + showSystemApps = false, ) val expectedStateAfterAction = SplitTunnelingUiState.ShowAppList( enabled = true, excludedApps = emptyList(), includedApps = listOf(app), - showSystemApps = false + showSystemApps = false, ) coEvery { mockedSplitTunnelingRepository.includeApp(AppId(app.packageName)) } returns Unit.right() @@ -142,7 +142,7 @@ class SplitTunnelingViewModelTest { enabled = true, excludedApps = emptyList(), includedApps = listOf(app), - showSystemApps = false + showSystemApps = false, ) val expectedStateAfterAction = @@ -150,7 +150,7 @@ class SplitTunnelingViewModelTest { enabled = true, excludedApps = listOf(app), includedApps = emptyList(), - showSystemApps = false + showSystemApps = false, ) coEvery { mockedSplitTunnelingRepository.excludeApp(AppId(app.packageName)) } returns @@ -185,7 +185,7 @@ class SplitTunnelingViewModelTest { SplitTunnelingViewModel( mockedApplicationsProvider, mockedSplitTunnelingRepository, - UnconfinedTestDispatcher() + UnconfinedTestDispatcher(), ) } } diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/VpnSettingsViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/VpnSettingsViewModelTest.kt index add2ee8580..c2f9ca34a6 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/VpnSettingsViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/VpnSettingsViewModelTest.kt @@ -57,7 +57,7 @@ class VpnSettingsViewModelTest { repository = mockSettingsRepository, systemVpnSettingsUseCase = mockSystemVpnSettingsUseCase, relayListRepository = mockRelayListRepository, - dispatcher = UnconfinedTestDispatcher() + dispatcher = UnconfinedTestDispatcher(), ) } @@ -145,9 +145,9 @@ class VpnSettingsViewModelTest { wireguard = WireguardTunnelOptions( mtu = null, - quantumResistant = QuantumResistantState.Off + quantumResistant = QuantumResistantState.Off, ), - dnsOptions = mockk(relaxed = true) + dnsOptions = mockk(relaxed = true), ) // Act, Assert diff --git a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/WelcomeViewModelTest.kt b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/WelcomeViewModelTest.kt index 9ef1455bb7..3fe3804b8b 100644 --- a/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/WelcomeViewModelTest.kt +++ b/android/app/src/test/kotlin/net/mullvad/mullvadvpn/viewmodel/WelcomeViewModelTest.kt @@ -84,7 +84,7 @@ class WelcomeViewModelTest { paymentUseCase = mockPaymentUseCase, connectionProxy = mockConnectionProxy, pollAccountExpiry = false, - isPlayBuild = false + isPlayBuild = false, ) } |
