From 9734f040e83326751a124548d7f6c18334dbdff7 Mon Sep 17 00:00:00 2001 From: Jonatan Rhodin Date: Mon, 12 Aug 2024 10:55:03 +0200 Subject: [PATCH] Fix unit tests --- .../net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt | 4 +--- .../net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt index 67258659054d..13d668b65bb7 100644 --- a/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt +++ b/android/lib/shared/src/main/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxy.kt @@ -4,16 +4,14 @@ import arrow.core.Either import arrow.core.raise.either import arrow.core.raise.ensure import kotlinx.coroutines.flow.combine -import mullvad_daemon.management_interface.location import net.mullvad.mullvadvpn.lib.daemon.grpc.ManagementService import net.mullvad.mullvadvpn.lib.model.ConnectError import net.mullvad.mullvadvpn.lib.model.GeoIpLocation import net.mullvad.mullvadvpn.lib.model.TunnelState -import net.mullvad.mullvadvpn.lib.model.location class ConnectionProxy( private val managementService: ManagementService, - private val translationRepository: RelayLocationTranslationRepository, + translationRepository: RelayLocationTranslationRepository, private val vpnPermissionRepository: VpnPermissionRepository ) { val tunnelState = diff --git a/android/lib/shared/src/test/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt b/android/lib/shared/src/test/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt index 74ab4f6b6453..138d0f5a41d9 100644 --- a/android/lib/shared/src/test/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt +++ b/android/lib/shared/src/test/kotlin/net/mullvad/mullvadvpn/lib/shared/ConnectionProxyTest.kt @@ -13,11 +13,14 @@ class ConnectionProxyTest { private val mockManagementService: ManagementService = mockk(relaxed = true) private val mockVpnPermissionRepository: VpnPermissionRepository = mockk() + private val mockTranslationRepository: RelayLocationTranslationRepository = + mockk(relaxed = true) private val connectionProxy: ConnectionProxy = ConnectionProxy( managementService = mockManagementService, - vpnPermissionRepository = mockVpnPermissionRepository + vpnPermissionRepository = mockVpnPermissionRepository, + translationRepository = mockTranslationRepository ) @Test