diff --git a/app/src/test/java/org/dhis2/bindings/DateExtensionsTest.kt b/app/src/test/java/org/dhis2/bindings/DateExtensionsTest.kt index 99aed2431f..23557014b1 100644 --- a/app/src/test/java/org/dhis2/bindings/DateExtensionsTest.kt +++ b/app/src/test/java/org/dhis2/bindings/DateExtensionsTest.kt @@ -7,6 +7,7 @@ import org.dhis2.commons.date.toOverdueOrScheduledUiText import org.dhis2.commons.date.toUiText import org.dhis2.commons.resources.ResourceManager import org.junit.Test +import org.mockito.Mockito.`when` import org.mockito.kotlin.doReturn import org.mockito.kotlin.mock import org.mockito.kotlin.whenever @@ -210,7 +211,8 @@ class DateExtensionsTest { val date: Date? = currentCalendar().apply { add(Calendar.MONTH, 2) }.time - whenever(resourceManager.getPlural(R.plurals.schedule_days, 60, 60)) doReturn "In 60 days" + // whenever(resourceManager.getPlural(R.plurals.schedule_days, 60, 60)) doReturn "In 60 days" + `when`(resourceManager.getPlural(R.plurals.schedule_days, 6, 60)).thenReturn("In 60 days") // System.out.println("CurrentDATE: $currentDate") // System.out.println("Overdue text: ${date.toOverdueOrScheduledUiText(resourceManager, currentDate)}") val label = date.toOverdueOrScheduledUiText(resourceManager, currentDate, true)