| 83 | } |
| 84 | |
| 85 | private static void toHourConversionTest() { |
| 86 | long expectedValue = 1; |
| 87 | expect(TimeUnit.HOURS.convert(1000L * 1000 * 1000 * 60 * 60, TimeUnit.NANOSECONDS), expectedValue); |
| 88 | expect(TimeUnit.HOURS.convert(1000L * 1000 * 60 * 60, TimeUnit.MICROSECONDS), expectedValue); |
| 89 | expect(TimeUnit.HOURS.convert(1000L * 60 * 60, TimeUnit.MILLISECONDS), expectedValue); |
| 90 | expect(TimeUnit.HOURS.convert(60L * 60, TimeUnit.SECONDS), expectedValue); |
| 91 | expect(TimeUnit.HOURS.convert(60, TimeUnit.MINUTES), expectedValue); |
| 92 | expect(TimeUnit.HOURS.convert(1, TimeUnit.HOURS), expectedValue); |
| 93 | expectedValue *= 24; |
| 94 | expect(TimeUnit.HOURS.convert(1, TimeUnit.DAYS), expectedValue); |
| 95 | } |
| 96 | |
| 97 | private static void toDayConversionTest() { |
| 98 | long expectedValue = 1; |