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 0dc464d commit 35e3ea6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions app/src/test/java/org/dhis2/bindings/DateExtensionsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,10 @@ 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"
`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)
System.out.println("FERDY label: $label")
whenever(resourceManager.getPlural(R.plurals.schedule_days, 60, 60)) doReturn "In 60 days"

System.out.println("CurrentDATE: $currentDate")
System.out.println("Overdue text: ${date.toOverdueOrScheduledUiText(resourceManager, currentDate, true)}")
assert(date.toOverdueOrScheduledUiText(resourceManager, currentDate, true) == "In 60 days")
}

Expand Down

0 comments on commit 35e3ea6

Please sign in to comment.