@author
124125126127128129130131
} @Test public void testMinutesAgo() throws Exception { PrettyTime t = new PrettyTime(new Date(1000 * 60 * 13), locale); assertEquals("13 minutit tagasi", t.format(new Date(0))); }
131132133134135136137138
} @Test public void testMinuteFromNow() throws Exception { PrettyTime t = newPrettyTimeWOJustNow(new Date(0), locale); assertEquals("minuti pärast", t.format(new Date(1000 * 60 * 1))); }
138139140141142143144145
} @Test public void testMinuteAgo() throws Exception { PrettyTime t = newPrettyTimeWOJustNow(new Date(1000 * 60 * 1), locale); assertEquals("minut tagasi", t.format(new Date(0))); }
145146147148149150151152
} @Test public void testHoursFromNow() throws Exception { PrettyTime t = new PrettyTime(new Date(0), locale); assertEquals("3 tunni pärast", t.format(new Date(1000 * 60 * 60 * 3))); }
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))); }