use of tech.units.indriya.quantity.time.TimeUnitQuantity in project indriya by unitsofmeasurement.
the class TimeQuantitiesConcurrentTest method toQuanityTest.
@Test
public void toQuanityTest() {
TimeUnitQuantity day = TimeUnitQuantity.of(DAYS, 1);
TimeUnitQuantity hour = TimeUnitQuantity.of(HOURS, 1);
TimeUnitQuantity minute = TimeUnitQuantity.of(MINUTES, 1);
TimeUnitQuantity second = TimeUnitQuantity.of(SECONDS, 1);
TimeUnitQuantity microSecond = TimeUnitQuantity.of(MICROSECONDS, 1);
TimeUnitQuantity milliSecond = TimeUnitQuantity.of(MILLISECONDS, 1);
TimeUnitQuantity nanoSecond = TimeUnitQuantity.of(NANOSECONDS, 1);
verifyQuantity(day.toQuantity(), DAY, 1);
verifyQuantity(hour.toQuantity(), HOUR, 1);
verifyQuantity(minute.toQuantity(), MINUTE, 1);
verifyQuantity(second.toQuantity(), SECOND, 1);
verifyQuantity(microSecond.toQuantity(), TimeQuantities.MICROSECOND, 1);
verifyQuantity(milliSecond.toQuantity(), TimeQuantities.MILLISECOND, 1);
verifyQuantity(nanoSecond.toQuantity(), TimeQuantities.NANOSECOND, 1);
}
Aggregations