Skip to content

Commit

Permalink
testing log in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdyrod committed May 29, 2024
1 parent 6f9d15d commit ef7204a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/test/java/org/dhis2/bindings/DateExtensionsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ef7204a

Please sign in to comment.