Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Tweak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 committed Jul 1, 2018
1 parent d7652e8 commit 7e4fbc9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ class StringExtension_ToRelativeDateTest {
assertThat("15.06.2018".toRelativeDate("", DateUtils.DAY_IN_MILLIS)).isEqualTo("15.06.2018")
assertThat("15.06.2018".toRelativeDate("yyyy-MM-dd", DateUtils.DAY_IN_MILLIS)).isEqualTo("15.06.2018")
assertThat("2018-06-15".toRelativeDate("", 0L)).isEqualTo("2018-06-15")
assertThat("2018-06-15".toRelativeDate("yyyy-MM-dd", 0L)).isEqualTo("15 juin 2018")
assertThat("2018-06-15".toRelativeDate("", DateUtils.DAY_IN_MILLIS)).isEqualTo("2018-06-15")
assertThat("2018-06-15".toRelativeDate("yyyy-MM-dd", DateUtils.DAY_IN_MILLIS)).isEqualTo("15 juin 2018")
assertThat("2018-06-15 02:34:56".toRelativeDate("", 0L)).isEqualTo("2018-06-15 02:34:56")
assertThat("2018-06-15 02:34:56".toRelativeDate("", DateUtils.DAY_IN_MILLIS)).isEqualTo("2018-06-15 02:34:56")

if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) {
assertThat("2018-06-15".toRelativeDate("yyyy-MM-dd", 0L)).isEqualTo("15 juin 2018")
assertThat("2018-06-15".toRelativeDate("yyyy-MM-dd", DateUtils.DAY_IN_MILLIS)).isEqualTo("15 juin 2018")
assertThat("2018-06-15 02:34:56".toRelativeDate("yyyy-MM-dd", 0L)).isEqualTo("15 juin 2018")
assertThat("2018-06-15 02:34:56".toRelativeDate("yyyy-MM-dd", DateUtils.DAY_IN_MILLIS)).isEqualTo("15 juin 2018")
}
Expand Down

0 comments on commit 7e4fbc9

Please sign in to comment.