@author
194195196197198199200201
} @Test public void testDaysAgoSingle() throws Exception { PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 24 * 1), locale); assertEquals("eile", t.format(new Date(0))); }
201202203204205206207208
} @Test public void testWeeksFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("3 nädala pärast", t.format(new Date(1000 * 60 * 60 * 24 * 7 * 3))); }
208209210211212213214215
} @Test public void testWeeksAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 24 * 7 * 3), locale); assertEquals("3 nädalat tagasi", t.format(new Date(0))); }
215216217218219220221222
} @Test public void testWeeksFromNowSingle() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("nädala pärast", t.format(new Date(1000 * 60 * 60 * 24 * 7 * 1))); }
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))); }