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 c959393 commit f8dc8ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/test/java/org/dhis2/bindings/DateExtensionsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,18 @@ class DateExtensionsTest {
// System.out.println("CurrentDATE: $currentDate")
// System.out.println("Overdue text: ${date.toOverdueOrScheduledUiText(resourceManager, currentDate)}")
val label = date.toOverdueOrScheduledUiText(resourceManager, currentDate, true)
println("FERDY: $label")
System.out.println("FERDY: $label")
// assert(date.toOverdueOrScheduledUiText(resourceManager, currentDate, true) == "In 30 days")
}

@Test
fun `Should return 'In x days', when the current date is -x days from the scheduled date and less than 90 days`() {
val currentDate = currentCalendar().time
val date: Date? = currentCalendar().apply {
add(Calendar.DAY_OF_MONTH, 15)
add(Calendar.DAY_OF_MONTH, 16)
}.time
whenever(resourceManager.getPlural(R.plurals.schedule_days, 15, 15)) doReturn "In 15 days"
assert(date.toOverdueOrScheduledUiText(resourceManager, currentDate) == "In 15 days")
whenever(resourceManager.getPlural(R.plurals.schedule_days, 16, 16)) doReturn "In 16 days"
assert(date.toOverdueOrScheduledUiText(resourceManager, currentDate) == "In 16 days")
}

@Test
Expand Down

0 comments on commit f8dc8ee

Please sign in to comment.