@author
222223224225226227228229
} @Test public void testWeeksAgoSingle() throws Exception { PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 24 * 7 * 1), locale); assertEquals("nädal tagasi", t.format(new Date(0))); }
229230231232233234235236
} @Test public void testMonthsFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("3 kuu pärast", t.format(new Date(1000L * 60 * 60 * 24 * 30 * 3))); }
236237238239240241242243
} @Test public void testMonthsAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 30 * 3), locale); assertEquals("3 kuud tagasi", t.format(new Date(0))); }
243244245246247248249250
} @Test public void testMonthFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("kuu pärast", t.format(new Date(1000L * 60 * 60 * 24 * 30 * 1))); }
250251252253254255256257
} @Test public void testMonthAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 30 * 1), locale); assertEquals("kuu tagasi", t.format(new Date(0))); }
257258259260261262263264
} @Test public void testYearsFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("3 aasta pärast", t.format(new Date(1000L * 60 * 60 * 24 * 365 * 3))); }
264265266267268269270271
} @Test public void testYearsAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 365 * 3), locale); assertEquals("3 aastat tagasi", t.format(new Date(0))); }
271272273274275276277278
} @Test public void testYearFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("aasta pärast", t.format(new Date(1000L * 60 * 60 * 24 * 366 * 1))); }
278279280281282283284285
} @Test public void testYearAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000L * 60 * 60 * 24 * 366 * 1), locale); assertEquals("aasta tagasi", t.format(new Date(0))); }
285286287288289290291292
} @Test public void testDecadesFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("3 aastakümne pärast", t.format(new Date(1000L * 60 * 60 * 24 * 365 * 10 * 3))); }