From c085a330b9b5559f485994441482b786c9429904 Mon Sep 17 00:00:00 2001 From: Victor Garcia Date: Fri, 15 Dec 2023 11:46:20 +0100 Subject: [PATCH] Adapt unit tests --- .../dhis2/usescases/settings/SettingsRepositoryTest.kt | 10 +++++----- .../dhis2/utils/granularsync/SMSSyncProviderTest.kt | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/test/java/org/dhis2/usescases/settings/SettingsRepositoryTest.kt b/app/src/test/java/org/dhis2/usescases/settings/SettingsRepositoryTest.kt index 2692d0cb83..4ffc7aa623 100644 --- a/app/src/test/java/org/dhis2/usescases/settings/SettingsRepositoryTest.kt +++ b/app/src/test/java/org/dhis2/usescases/settings/SettingsRepositoryTest.kt @@ -383,15 +383,15 @@ class SettingsRepositoryTest { } private fun configureSMSConfig() { - whenever(localDbRepository.isModuleEnabled) doReturn + whenever(localDbRepository.isModuleEnabled()) doReturn Single.just(true) - whenever(localDbRepository.gatewayNumber) doReturn + whenever(localDbRepository.getGatewayNumber()) doReturn Single.just("gatewaynumber") - whenever(localDbRepository.waitingForResultEnabled) doReturn + whenever(localDbRepository.getWaitingForResultEnabled()) doReturn Single.just(true) - whenever(localDbRepository.confirmationSenderNumber) doReturn + whenever(localDbRepository.getConfirmationSenderNumber()) doReturn Single.just("confirmationNumber") - whenever(localDbRepository.waitingResultTimeout) doReturn + whenever(localDbRepository.getWaitingResultTimeout()) doReturn Single.just(120) whenever(d2.smsModule().configCase()) doReturn ConfigCase( diff --git a/app/src/test/java/org/dhis2/utils/granularsync/SMSSyncProviderTest.kt b/app/src/test/java/org/dhis2/utils/granularsync/SMSSyncProviderTest.kt index 4ef326da74..9c1bd98c41 100644 --- a/app/src/test/java/org/dhis2/utils/granularsync/SMSSyncProviderTest.kt +++ b/app/src/test/java/org/dhis2/utils/granularsync/SMSSyncProviderTest.kt @@ -233,7 +233,7 @@ class SMSSyncProviderTest { d2.smsModule().configCase(), ) doReturn mock() whenever( - d2.smsModule().configCase().smsModuleConfig, + d2.smsModule().configCase().getSmsModuleConfig(), ) doReturn Single.just(smsConfig) } @@ -298,7 +298,7 @@ class SMSSyncProviderTest { d2.smsModule().configCase(), ) doReturn mock() whenever( - d2.smsModule().configCase().smsModuleConfig, + d2.smsModule().configCase().getSmsModuleConfig(), ) doReturn Single.just(smsConfig) } }