Skip to content
Snippets Groups Projects
Unverified Commit 01a52e80 authored by Jakob Möller's avatar Jakob Möller Committed by GitHub
Browse files

Fix/no error on network connectivity error (#414)


* No Error Dialog on Network Connectivity missing

Signed-off-by: default avatard067928 <jakob.moeller@sap.com>

* fixed unit test and changed comments

Co-authored-by: default avatarHee Tatt Ooi <hee.tatt.ooi@sap.com>
Co-authored-by: default avatarPhilipp Woessner <philipp.woessner@sap.com>
parent 386a46f0
No related branches found
No related tags found
No related merge requests found
......@@ -4,10 +4,7 @@ import androidx.core.app.NotificationCompat
import com.google.android.gms.nearby.exposurenotification.ExposureSummary
import de.rki.coronawarnapp.CoronaWarnApplication
import de.rki.coronawarnapp.R
import de.rki.coronawarnapp.exception.ExceptionCategory
import de.rki.coronawarnapp.exception.NoNetworkException
import de.rki.coronawarnapp.exception.RiskLevelCalculationException
import de.rki.coronawarnapp.exception.reporting.report
import de.rki.coronawarnapp.nearby.InternalExposureNotificationClient
import de.rki.coronawarnapp.notification.NotificationHelper
import de.rki.coronawarnapp.risk.RiskLevel
......@@ -314,7 +311,7 @@ object RiskLevelTransaction : Transaction() {
/**
* Executes the [CHECK_APP_CONNECTIVITY] Transaction State
* If there is no connectivity the transaction will set the last calculated
* risk level, report a [NoNetworkException] and closes the transaction
* risk level and closes the transaction
*
* @return
*/
......@@ -325,11 +322,6 @@ object RiskLevelTransaction : Transaction() {
if (!isNetworkEnabled) {
RiskLevelRepository.setLastCalculatedRiskLevelAsCurrent()
NoNetworkException(
IllegalStateException("Network is required to retrieve the Application Configuration")
).report(
ExceptionCategory.CONNECTIVITY
)
return@executeState false
}
return@executeState true
......
......@@ -3,7 +3,6 @@ package de.rki.coronawarnapp.transaction
import android.content.Context
import com.google.android.gms.nearby.exposurenotification.ExposureSummary
import de.rki.coronawarnapp.CoronaWarnApplication
import de.rki.coronawarnapp.exception.TransactionException
import de.rki.coronawarnapp.nearby.InternalExposureNotificationClient
import de.rki.coronawarnapp.risk.RiskLevel
import de.rki.coronawarnapp.risk.RiskLevel.INCREASED_RISK
......@@ -363,7 +362,7 @@ class RiskLevelTransactionTest {
}
/** Test case if app is not connected */
@Test(expected = TransactionException::class)
@Test
fun checkAppConnectivity() {
val testRiskLevel = INCREASED_RISK
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment