@author
152153154155156157158159
} @Test public void testHoursAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 3), locale); assertEquals("3 tundi tagasi", t.format(new Date(0))); }
159160161162163164165166
} @Test public void testHoursFromNowSingle() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("tunni pärast", t.format(new Date(1000 * 60 * 60 * 1))); }
166167168169170171172173
} @Test public void testHoursAgoSingle() throws Exception { PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 1), locale); assertEquals("tund tagasi", t.format(new Date(0))); }
173174175176177178179180
} @Test public void testDaysFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("3 päeva pärast", t.format(new Date(1000 * 60 * 60 * 24 * 3))); }
180181182183184185186187
} @Test public void testDaysAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 24 * 3), locale); assertEquals("3 päeva tagasi", t.format(new Date(0))); }
187188189190191192193194
} @Test public void testDaysFromNowSingle() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("homme", t.format(new Date(1000 * 60 * 60 * 24 * 1))); }
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))); }