コード例 #1
0
 /**
  * Tests {@link AnnouncementPeriodicTask#getAnnounceTime(long)} with plural numbers without the
  * hour unit.
  */
 public void testGetAnnounceTime_plural_no_hour() {
   long time = (2 * 60 * 1000) + (2 * 1000); // 2 minutes 2 seconds
   assertEquals("2 minutes 2 seconds", task.getAnnounceTime(time));
 }
コード例 #2
0
 /** Tests {@link AnnouncementPeriodicTask#getAnnounceTime(long)} with time one. */
 public void testGetAnnounceTime_time_one() {
   long time = 1 * 1000; // 1 second
   assertEquals("0 minutes 1 second", task.getAnnounceTime(time));
 }
コード例 #3
0
 /**
  * Tests {@link AnnouncementPeriodicTask#getAnnounceTime(long)} with singular numbers without the
  * hour unit.
  */
 public void testGetAnnounceTime_singular_no_hour() {
   long time = (1 * 60 * 1000) + (1 * 1000); // 1 minute 1 second
   assertEquals("1 minute 1 second", task.getAnnounceTime(time));
 }
コード例 #4
0
 /** Tests {@link AnnouncementPeriodicTask#getAnnounceTime(long)} with time zero. */
 public void testGetAnnounceTime_time_zero() {
   long time = 0; // 0 seconds
   assertEquals("0 minutes 0 seconds", task.getAnnounceTime(time));
 }