DateUtilsTestpublic class DateUtilsTest extends TestCase
Methods Summary |
---|
public void | test_formatDuration_Hours()
assertEquals("59 minutes", DateUtils.formatDuration(3540000));
assertEquals("1 hour", DateUtils.formatDuration(3600000));
assertEquals("48 hours", DateUtils.formatDuration(172800000));
| public void | test_formatDuration_Minutes()
assertEquals("59 seconds", DateUtils.formatDuration(59000));
assertEquals("60 seconds", DateUtils.formatDuration(59500));
assertEquals("1 minute", DateUtils.formatDuration(60000));
assertEquals("2 minutes", DateUtils.formatDuration(120000));
| public void | test_formatDuration_seconds()
assertEquals("0 seconds", DateUtils.formatDuration(0));
assertEquals("0 seconds", DateUtils.formatDuration(1));
assertEquals("0 seconds", DateUtils.formatDuration(499));
assertEquals("1 second", DateUtils.formatDuration(500));
assertEquals("1 second", DateUtils.formatDuration(1000));
assertEquals("2 seconds", DateUtils.formatDuration(1500));
|
|